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

rename create-controller-token flag to enable-controller #1072

Closed

Conversation

kschoche
Copy link
Contributor

@kschoche kschoche commented Mar 3, 2022

Since server-acl-init no longer creates a controller token rename the flag to -enable-controller.

Changes proposed in this PR:

  • renames -create-controller-token flag to -enable-controller for server-acl-init.

How I've tested this PR:
unit tests still pass

How I expect reviewers to test this PR:

Checklist:

  • Tests added
  • CHANGELOG entry added

    HashiCorp engineers only, community PRs should not add a changelog entry.
    Entries should use present tense (e.g. Add support for...)

kschoche and others added 3 commits March 2, 2022 13:10
)

* Use a Consul Kubernetes Auth Method to issue consul-login to mint ACL tokens and consul-logout to clean them up for the CRD controller.

Co-authored-by: Iryna Shustava <ishustava@users.noreply.github.com>
@kschoche kschoche added the area/acls Related to ACLs label Mar 3, 2022
@kschoche kschoche requested a review from a team March 3, 2022 16:20
@kschoche kschoche self-assigned this Mar 3, 2022
@kschoche kschoche requested review from ishustava and thisisnotashwin and removed request for a team March 3, 2022 16:20
@@ -147,7 +147,7 @@ func (c *Command) init() {
c.flags.StringVar(&c.flagBindingRuleSelector, "acl-binding-rule-selector", "",
"Selector string for connectInject ACL Binding Rule.")

c.flags.BoolVar(&c.flagCreateControllerPoliciesAndBindings, "create-controller-token", false,
c.flags.BoolVar(&c.flagEnableController, "enable-controller", false,
"Toggle for creating acl policies and rolebindings for the controller.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Toggle for creating acl policies and rolebindings for the controller.")
"Toggle for configuring ACLs for the controller.")

@@ -251,7 +251,7 @@ spec:
{{- end }}

{{- if .Values.controller.enabled }}
-create-controller-token=true \
-enable-controller=true \
Copy link
Contributor

Choose a reason for hiding this comment

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

how about -controller=true? It seems similar to patterns we have for partitions.

@@ -47,7 +47,7 @@ type Command struct {
flagInjectAuthMethodHost string
flagBindingRuleSelector string

flagCreateControllerPoliciesAndBindings bool
flagEnableController bool
Copy link
Contributor

Choose a reason for hiding this comment

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

This can still stay the same though. Just the name of the flag can be -controller

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we usually try to match the var name with flag name. IMO it's kind of nice to know what the flag name is by looking at the command var as you're reading through the code.

@jmurret jmurret force-pushed the acls-refactor-base-branch branch from 16eaf74 to 5bee0db Compare March 4, 2022 23:27
@ishustava ishustava mentioned this pull request Mar 7, 2022
2 tasks
@jmurret jmurret force-pushed the acls-refactor-base-branch branch from e50a4d2 to fc88732 Compare March 9, 2022 15:07
@kschoche kschoche closed this Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/acls Related to ACLs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants