-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move logic for
-enable-leader-election
flag in helm templates (#3475)
* Move logic for -enable-leader-election flag * Ensure -leader-election-lock-name is only set when leader election is enabled. * Fix formatting * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: Venktesh Shivam Patel <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d443d3a
commit ae5caa5
Showing
3 changed files
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
deployments/helm-chart/templates/controller-leader-election-configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
{{- if .Values.controller.reportIngressStatus.enableLeaderElection }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "nginx-ingress.leaderElectionName" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "nginx-ingress.labels" . | nindent 4 }} | ||
{{- if .Values.controller.reportIngressStatus.annotations }} | ||
annotations: | ||
{{ toYaml .Values.controller.reportIngressStatus.annotations | indent 4 }} | ||
{{- end }} | ||
{{- if .Values.controller.reportIngressStatus.annotations }} | ||
annotations: | ||
{{ toYaml .Values.controller.reportIngressStatus.annotations | indent 4 }} | ||
{{- end }} | ||
{{- end }} |