Skip to content

Fix ENABLE_LEADER_ELECTION env variable name #466

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 1 commit into from
Sep 11, 2023
Merged

Fix ENABLE_LEADER_ELECTION env variable name #466

merged 1 commit into from
Sep 11, 2023

Conversation

msvticket
Copy link
Contributor

Description of changes:

This fixes that setting and use of env variable had different names.
Without this fix leader election is always enabled in controller, but permissions might not be given.

So if leader election isn't enabled in the values you get constant messages like:

E0911 06:54:26.919325 1 leaderelection.go:330] error retrieving resource lock alb-ingress/ack-acm.services.k8s.aws: leases.coordination.k8s.io "ack-acm.services.k8s.aws" is forbidden: User "system:serviceaccount:alb-ingress:ack-acm-controller" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "alb-ingress"

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

Without fix leader election is always enabled in controller, while permissions might not be given
@ack-prow ack-prow bot requested review from a-hilaly and jljaco September 11, 2023 07:38
@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 11, 2023
@ack-prow
Copy link

ack-prow bot commented Sep 11, 2023

Hi @msvticket. 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.

@msvticket
Copy link
Contributor Author

/assign @a-hilaly

@a-hilaly
Copy link
Member

Thank you @msvticket !
/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 11, 2023
@a-hilaly a-hilaly changed the title fix: env variable name fix Fix ENABLE_LEADER_ELECTION env variable name Sep 11, 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.

/lgtm

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

ack-prow bot commented Sep 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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

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.

2 participants