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

bugfix: add auth flag for cluster scale #1489

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

kakaZhou719
Copy link
Member

@kakaZhou719 kakaZhou719 commented Jun 9, 2022

Describe what this PR does / why we need it

  1. add ssh auth flag and env for sealer join.
  2. add env flag for sealer delete.
  3. split cluster v1 and cluster v2 save logic at Clusterfile saving stage.
  4. avoid adding empty struct filed of Clusterfile.

Does this pull request fix one issue?

fixes #1469

Describe how you did it

Describe how to verify it

test success on my side:

all cluster node use the same password:

sealer run kubernetes:v1.21.12 -m 172.16.0.200 -p password
sealer join kubernetes:v1.21.12 -n 172.16.0.201
sealer delete -n 172.16.0.201
sealer run kubernetes:v1.21.12 # local host as master0, no need to set password
sealer join kubernetes:v1.21.12 -n 172.16.0.201 -p password123 # if join another node, need to set password.
sealer delete -n 172.16.0.201

all cluster node use the different password:

sealer run kubernetes:v1.21.12 -m 172.16.0.200 -p password
sealer join kubernetes:v1.21.12 -n 172.16.0.201 -p password123
sealer delete -n 172.16.0.201 

Special notes for reviews

@codecov-commenter
Copy link

Codecov Report

Merging #1489 (4587b00) into main (61c1a72) will decrease coverage by 0.07%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1489      +/-   ##
==========================================
- Coverage   11.74%   11.67%   -0.08%     
==========================================
  Files          76       76              
  Lines        6792     6833      +41     
==========================================
  Hits          798      798              
- Misses       5892     5933      +41     
  Partials      102      102              
Impacted Files Coverage Δ
apply/apply.go 0.00% <ø> (ø)
apply/run.go 0.00% <0.00%> (ø)
apply/scale.go 8.59% <0.00%> (-3.37%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 61c1a72...4587b00. Read the comment docs.

@@ -96,6 +96,7 @@ func init() {
deleteCmd.Flags().StringVarP(&deleteArgs.Nodes, "nodes", "n", "", "reduce Count or IPList to nodes")
deleteCmd.Flags().StringVarP(&deleteClusterFile, "Clusterfile", "f", "", "delete a kubernetes cluster with Clusterfile Annotations")
deleteCmd.Flags().StringVarP(&deleteClusterName, "cluster", "c", "", "delete a kubernetes cluster with cluster name")
deleteCmd.Flags().StringSliceVarP(&deleteArgs.CustomEnv, "env", "e", []string{}, "set custom environment variables")
Copy link
Member

Choose a reason for hiding this comment

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

set or delete?

Copy link
Member Author

Choose a reason for hiding this comment

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

its set , thats because in some case user want to set custom Env params for supporting execute clean scripts .

@kakaZhou719 kakaZhou719 requested a review from VinceCui June 9, 2022 02:19
@kakaZhou719
Copy link
Member Author

/test apply

@kakaZhou719 kakaZhou719 requested a review from bxy4543 June 9, 2022 06:03
@VinceCui
Copy link
Collaborator

LGTM

@VinceCui VinceCui merged commit bdedd8f into sealerio:main Jun 13, 2022
bxy4543 pushed a commit to bxy4543/sealer that referenced this pull request Jun 27, 2022
@kakaZhou719 kakaZhou719 added kind/bug Something isn't working bugfix labels Jul 5, 2022
@kakaZhou719 kakaZhou719 deleted the bugfix-cluster-scale branch June 28, 2023 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sealer subcommand "join" doesn't support --passwd, --pk, --env, which is supported in subcommand "run".
5 participants