use release namespace for leader election
Change the way that the leader election namespace is set. Currently the values.yaml file has an option to set the leader election namespace to .Values.leaderElection.namespace but when developers install cert-manager into a different namespace the roles will not have permission to acquire leases in that namespace. This PR simplifies the Roles to use the cert-manager.namespace function which uses .Release.Namespace.
Pull Request Motivation
Attempts to solve the following issue https://github.com/cert-manager/cert-manager/issues/6716
Kind
Release Note
Removes the .Values.leaderElection.namespace option and switches the leader election namespace to match .Release.Namespace via cert-manager.namespace helm function
Hi @aburan28. Thanks for your PR.
I'm waiting for a cert-manager 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.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign inteon for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
/lifecycle stale
/remove-lifecycle stale
@aburan28 - I appreciate the thought to consolidate the leader election into the installation namespace.
However for backwards compatibility I wouldn't remove the option from the chart.
I would instead have the .Values.global.leaderElection.namespace unset / empty (currently kube-system). Then default to the .Release.namespace but allow it to be overriden for backwards compatibility.
However this would change the default, so would be a breaking change to consider. Would have to check with maintainers about the default change.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
/lifecycle stale
/kind bug
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
/lifecycle rotten
/remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
/close
@cert-manager-bot: Closed this PR.
In response to this:
Rotten issues close after 30d of inactivity. Reopen the issue with
/reopen. Mark the issue as fresh with/remove-lifecycle rotten. /close
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-sigs/prow repository.