Skip to content
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

Create unique lease obj for each NIC installed via Helm #6372

Merged
merged 7 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions charts/nginx-ingress/templates/controller-lease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{ if .Values.controller.reportIngressStatus.enableLeaderElection }}
apiVersion: coordination.k8s.io/v1
kind: Lease
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 }}
{{- end }}
2 changes: 0 additions & 2 deletions charts/nginx-ingress/templates/controller-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ rules:
- coordination.k8s.io
resources:
- leases
resourceNames:
- {{ .Values.controller.reportIngressStatus.leaderElectionLockName }}
pdabelf5 marked this conversation as resolved.
Show resolved Hide resolved
verbs:
- get
- update
Expand Down
3 changes: 2 additions & 1 deletion charts/nginx-ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,8 @@ controller:
enableLeaderElection: true

## Specifies the name to be used as the lock for leader election. controller.reportIngressStatus.enableLeaderElection must be set to true.
leaderElectionLockName: "nginx-ingress-leader"
## The default is autogenerated.
leaderElectionLockName: ""

## The annotations of the leader election configmap.
annotations: {}
Expand Down
Loading