Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make the usage of '--env' flag more precisely #4060

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

fengxsong
Copy link
Collaborator

@fengxsong fengxsong commented Oct 10, 2023

🤖 Generated by Copilot at 5b96fb6

Summary

🌟📝🧹

This pull request improves the sealos gen command and the clusterfile package by using consistent logging, simplifying the code, and clarifying the flags. It also fixes a bug in the gen command related to default values for kubeadm configs.

The sealos gen command got a boost
With logger and output to choose
The env flag is clear
The clusterfile is sheer
And kubeadm configs don't get reduced

Walkthrough

  • Import logger package and add log messages for gen command (link, link, link, link)
  • Modify description of env flag in apply and gen commands to clarify its usage (link, link)
  • Append global environment variables from env flag to cluster spec (link)
  • Remove setDefaults field and option from ClusterFile type and LoadKubeadmConfigs function, as it is no longer needed (link, link, link)
  • Remove logic to set environment variables from customEnvs slice to os environment, as it is no longer needed to process the clusterfile (link)
  • Remove unused os and strings packages from clusterfile package (link)

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Oct 10, 2023

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 942
✅ Successful 369
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 572
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

@fengxsong
Copy link
Collaborator Author

fix #4058

@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Files Coverage Δ
pkg/apply/args.go 100.00% <100.00%> (ø)
pkg/apply/gen.go 39.21% <0.00%> (-4.27%) ⬇️

📢 Thoughts on this report? Let us know!.

@cuisongliu cuisongliu linked an issue Oct 10, 2023 that may be closed by this pull request
@cuisongliu cuisongliu added this to the v4.4 milestone Oct 10, 2023
@@ -23,6 +23,7 @@ import (

"github.com/spf13/cobra"

"github.com/labring/sealos/controllers/pkg/utils/logger"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logger using pkg/logger

@cuisongliu cuisongliu merged commit f8764c8 into labring:main Oct 10, 2023
89 of 91 checks passed
@sealos-ci-robot
Copy link
Member

/cherry-pick release-v4.4

@sealos-ci-robot
Copy link
Member

🤖 says: cherry pick action finished successfully 🎉!
See: https://github.com/labring/sealos/actions/runs/6469106925

sealos-ci-robot pushed a commit that referenced this pull request Oct 10, 2023
cuisongliu pushed a commit that referenced this pull request Oct 10, 2023
muicoder added a commit to muicoder/sealos that referenced this pull request Oct 11, 2023
fix: make the usage of '--env' flag more precisely (labring#4060) (labring#4063)
@muicoder muicoder mentioned this pull request Oct 11, 2023
cuisongliu pushed a commit that referenced this pull request Oct 11, 2023
fix: make the usage of '--env' flag more precisely (#4060) (#4063)
bxy4543 pushed a commit to bxy4543/sealos that referenced this pull request Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: The env parameter brought in by gen is missing
3 participants