-
Notifications
You must be signed in to change notification settings - Fork 39.7k
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
Add more kubectl auth reconcile flags #64541
Conversation
pkg/kubectl/cmd/auth/reconcile.go
Outdated
@@ -89,6 +90,7 @@ func NewCmdReconcile(f cmdutil.Factory, streams genericclioptions.IOStreams) *co | |||
|
|||
cmdutil.AddFilenameOptionFlags(cmd, o.FilenameOptions, "identifying the resource to reconcile.") | |||
cmd.Flags().BoolVar(&o.DryRun, "dry-run", o.DryRun, "If true, display results but do not submit changes") | |||
cmd.Flags().BoolVar(&o.AdditiveOnly, "additive-only", true, "If true, preserve modified roles and bindings") |
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.
I assume the true
should be set in o
and then passed as the third arg?
/ok-to-test |
Updated. |
pkg/kubectl/cmd/auth/reconcile.go
Outdated
@@ -89,6 +91,7 @@ func NewCmdReconcile(f cmdutil.Factory, streams genericclioptions.IOStreams) *co | |||
|
|||
cmdutil.AddFilenameOptionFlags(cmd, o.FilenameOptions, "identifying the resource to reconcile.") | |||
cmd.Flags().BoolVar(&o.DryRun, "dry-run", o.DryRun, "If true, display results but do not submit changes") | |||
cmd.Flags().BoolVar(&o.AdditiveOnly, "additive-only", o.AdditiveOnly, "If true, preserve modified roles and bindings") |
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.
I prefer using CLI commands that bool flags default to false.
@kubernetes/sig-cli-maintainers @soltysh
This needs to wait until 1.12 |
SGTM
|
how about |
I think separate control over removing extra permissions and removing extra subjects makes sense, and makes for very clear flags --remove-extra-permissions |
Adds --remove-extra-permissions and --remove-extra-subjects Signed-off-by: Matt Rogers <[email protected]>
Updated with separated flags as @liggitt suggested. |
/retest |
/lgtm |
/retest |
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enj, mrogers950, soltysh 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 |
/retest Review the full test history for this PR. Silence the bot with an |
4 similar comments
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
Automatic merge from submit-queue (batch tested with PRs 63580, 63744, 64541, 64502, 64100). If you want to cherry-pick this change to another branch, please follow the instructions here. |
/assign @deads2k
cc @enj @juanvallejo