From 01b8f9bdfe06570b90d89cd40146b298ed44c754 Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Thu, 10 Oct 2019 10:31:28 +0100 Subject: [PATCH 1/2] Fix trailing leader election cm when using helm When removing an ingress controller deployment managed by helm. This would leave a leader election configmap because it was created by the IC and not managed by Tiller/Helm. This commit pre-allocates the configmap so it is now managed by Helm. --- .../templates/controller-leader-election-configmap.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 deployments/helm-chart/templates/controller-leader-election-configmap.yaml diff --git a/deployments/helm-chart/templates/controller-leader-election-configmap.yaml b/deployments/helm-chart/templates/controller-leader-election-configmap.yaml new file mode 100644 index 0000000000..4cf54d5b3a --- /dev/null +++ b/deployments/helm-chart/templates/controller-leader-election-configmap.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "nginx-ingress.leaderElectionName" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "nginx-ingress.labels" . | nindent 4 }} +data: From 76322bfbe79c4c4f75bd088ea2953266f43d6161 Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Thu, 10 Oct 2019 14:46:40 +0100 Subject: [PATCH 2/2] Remove empty data field from cm --- .../templates/controller-leader-election-configmap.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/deployments/helm-chart/templates/controller-leader-election-configmap.yaml b/deployments/helm-chart/templates/controller-leader-election-configmap.yaml index 4cf54d5b3a..07eb9bae18 100644 --- a/deployments/helm-chart/templates/controller-leader-election-configmap.yaml +++ b/deployments/helm-chart/templates/controller-leader-election-configmap.yaml @@ -5,4 +5,3 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "nginx-ingress.labels" . | nindent 4 }} -data: