-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: support specify password when deploy #417
Conversation
@Xvv-v: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Codecov Report
@@ Coverage Diff @@
## release-1.3 #417 +/- ##
===============================================
- Coverage 12.85% 12.85% -0.01%
===============================================
Files 103 103
Lines 15842 15843 +1
===============================================
Hits 2036 2036
- Misses 13561 13562 +1
Partials 245 245
|
Signed-off-by: xu.jingwen <xu.jingwen@99cloud.net>
Signed-off-by: xu.jingwen <xu.jingwen@99cloud.net>
/cc @lixd |
@@ -85,4 +108,5 @@ func (a *AuthenticationOptions) AddFlags(fs *pflag.FlagSet) { | |||
fs.IntVar(&a.LoginHistoryMaximumEntries, "login-history-maximum-entries", a.LoginHistoryMaximumEntries, "login-history-maximum-entries defines how many entries of login history should be kept.") | |||
fs.DurationVar(&a.OAuthOptions.AccessTokenMaxAge, "access-token-max-age", a.OAuthOptions.AccessTokenMaxAge, "access-token-max-age control the lifetime of access tokens, 0 means no expiration.") | |||
fs.DurationVar(&a.MaximumClockSkew, "maximum-clock-skew", a.MaximumClockSkew, "The maximum time difference between the system clocks of the ks-apiserver that issued a JWT and the ks-apiserver that verified the JWT.") | |||
fs.StringVar(&a.InitialPassword, "user-password", constatns.DefaultAdminUserPass, "internal user password") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe need to specify this flag is specify for admin user.
and why not use a.InitialPassword
as default value like kcctl deploy?
pkg/server/server.go
Outdated
@@ -362,6 +362,7 @@ func (s *APIServer) migrateUser(operator iam.Operator) error { | |||
return nil | |||
} | |||
|
|||
Users := GetInternalUser(s.Config.AuthenticationOptions.InitialPassword) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename Users
to users
pkg/cli/deploy/deploy.go
Outdated
@@ -164,6 +163,7 @@ func NewCmdDeploy(streams options.IOStreams) *cobra.Command { | |||
cmd.Flags().DurationVar(&o.deployConfig.AuthenticationOpts.AuthenticateRateLimiterDuration, "authenticate-rate-limiter-duration", o.deployConfig.AuthenticationOpts.AuthenticateRateLimiterDuration, "specifies the lock duration of the user") | |||
cmd.Flags().DurationVar(&o.deployConfig.AuthenticationOpts.LoginHistoryRetentionPeriod, "login-history-retention-period", o.deployConfig.AuthenticationOpts.LoginHistoryRetentionPeriod, "login-history-retention-period defines how long login history should be kept.") | |||
cmd.Flags().IntVar(&o.deployConfig.AuthenticationOpts.LoginHistoryMaximumEntries, "login-history-maximum-entries", o.deployConfig.AuthenticationOpts.LoginHistoryMaximumEntries, "login-history-maximum-entries defines how many entries of login history should be kept.") | |||
cmd.Flags().StringVar(&o.deployConfig.AuthenticationOpts.InitialPassword, "user-password", o.deployConfig.AuthenticationOpts.InitialPassword, "internal user password") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe need to specify this flag is specify for admin user
Signed-off-by: xu.jingwen <xu.jingwen@99cloud.net>
Signed-off-by: xu.jingwen <xu.jingwen@99cloud.net>
/lgtm |
LGTM label has been added. Git tree hash: 3d7e43cc144c2530cb98c7e0668711a5050f94bb
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: x893675, Xvv-v The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherrypick master |
@x893675: once the present PR merges, I will cherry-pick it on top of master in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@x893675: new pull request created: #426 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Sign-off-by: xu.jingwen xu.jingwen@99cloud.net
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #419
Special notes for reviewers:
Does this PR introduced a user-facing change?
Additional documentation, usage docs, etc.: