Skip to content

(fix) enable custom names for service accounts #468

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

Merged
merged 3 commits into from
Sep 14, 2023

Conversation

grandwizard28
Copy link
Contributor

@grandwizard28 grandwizard28 commented Sep 14, 2023

Issue N/A

Allow leaderElection role to be bound to a custom ServiceAccount name, similarily to the main cluster role.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-prow ack-prow bot requested review from a-hilaly and jaypipes September 14, 2023 12:25
@ack-prow
Copy link

ack-prow bot commented Sep 14, 2023

Hi @grandwizard28. Thanks for your PR.

I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@ack-prow ack-prow bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 14, 2023
Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

Thank you!
/lgtm

@ack-prow ack-prow bot added lgtm Indicates that a PR is ready to be merged. approved labels Sep 14, 2023
@a-hilaly
Copy link
Member

/ok-to-test

@ack-prow ack-prow bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 14, 2023
@@ -14,6 +14,6 @@ roleRef:
name: {{.ServicePackageName}}-leader-election-role
subjects:
- kind: ServiceAccount
name: {{.ServiceAccountName}}
name: {{ include "service-account.name" . }}
Copy link
Member

Choose a reason for hiding this comment

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

@grandwizard28 since this is template generating helm templates we'll have to do something like

{{ "{{ include "service-account.name" . }}" }}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, my bad!

@ack-prow ack-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 14, 2023
@grandwizard28
Copy link
Contributor Author

/retest

@@ -14,6 +14,6 @@ roleRef:
name: {{.ServicePackageName}}-leader-election-role
subjects:
- kind: ServiceAccount
name: {{.ServiceAccountName}}
name: {{ "{{ include "service-account.name" . }}" }}
Copy link
Member

Choose a reason for hiding this comment

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

Looks like we need to prepend an \ for the helm brackets. I still get confused with this templinception..

Suggested change
name: {{ "{{ include "service-account.name" . }}" }}
name: {{ "{{ include \"service-account.name\" . }}" }}

Copy link
Member

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Hahaha, what a coincidence, I just pushed the same patch!

@ack-prow
Copy link

ack-prow bot commented Sep 14, 2023

@a-hilaly: GitHub didn't allow me to request PR reviews from the following users: grandwizard28.

Note that only aws-controllers-k8s members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @grandwizard28

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.

@grandwizard28
Copy link
Contributor Author

/retest

@a-hilaly
Copy link
Member

/test ec2-controller-test
/test s3-controller-test

@a-hilaly
Copy link
Member

tests decided to be flaky today...
/test s3-controller-test

@a-hilaly
Copy link
Member

/test s3-controller-test

1 similar comment
@a-hilaly
Copy link
Member

/test s3-controller-test

Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

Thank you @grandwizard28 @vibhu-mudrex ! 👍
/test all
/lgtm

@a-hilaly
Copy link
Member

/test all
/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Sep 14, 2023
@ack-prow
Copy link

ack-prow bot commented Sep 14, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a-hilaly, grandwizard28

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@a-hilaly
Copy link
Member

/test dynamodb-controller-test

@ack-prow ack-prow bot merged commit 26e1317 into aws-controllers-k8s:main Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants