-
Notifications
You must be signed in to change notification settings - Fork 2k
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 ConfigMap name to values.yaml and allow the option to specify the leader election lock name #534
Add ConfigMap name to values.yaml and allow the option to specify the leader election lock name #534
Conversation
The value is used for `.metadata.name` in the ConfigMap yaml, as well as with the `--nginx-configmaps` flag for the container.
eab5978
to
a02129e
Compare
@paigr thanks for the PR! The part about the leader election looks good to me! Thanks for changing all the necessary docs. The only thing I would change is the default for the leader-election-lock-name Regarding the part about the
Because some of the resources in the helm chart are created with the same names, the second |
Thanks for your comments @pleshakov. For I agree with your point that the default value for the leader lock should be |
@paigr If this solves your problem, we're are happy to merge. However, please address the suggestion above and squash the leaderElectionLockName-related commits into a single one.
Yes, we're looking into that. We might use the release name as part of the name as well. |
By default, a ConfigMap with the name `leader-election` is used. This can cause problems if multiple deployments of the Ingress controller exist within the same namespace. See nginxinc#528
8bdf223
to
cd8efa4
Compare
@pleshakov during my tests I identified another potential bug. The template helper that defines I think generating the ConfigMap name will not break anything on our end. If we retain the option to set the name in the Helm template, as well as via CLI flag, there should be no problems. |
this was not intentional. good catch! However, I suggest leaving that fix out the scope of this PR. We're gonna change the logic of how the name is generated for the resources anyway -- as I mentioned we will use the release name as part of the name as well. thanks |
@pleshakov will this be done soon? Happy to remove it from this PR, but we do need that change as it gets in the way of deploying multiple ICs into the same namespace (which was the motivation for this PR). |
@paigr yes, this should be done in the next two weeks (by April 26th or sooner). would you be ok to use a modified copy for the time being? |
cd8efa4
to
5a6a62c
Compare
Sure, no problem, I have removed the commit. |
@paigr great! we'll merge shortly |
@paigr thanks a lot! |
Proposed changes
Allow the customisation of the ConfigMap name within the helm template. The value is used for
.metadata.name
in the ConfigMap yaml, as well as with the-nginx-configmaps
flag for the container.Also allows specifying the name used for the lock with leader election enabled. This was implemented as a new CLI flag,
-leader-election-lock-name
, and an accompanying entry in the Helm template'svalues.yaml
.Resolves #528
Checklist
Before creating a PR, run through this checklist and mark each as complete.