From f7fea6b98f8e4f3a320da940527ddce01277e538 Mon Sep 17 00:00:00 2001
From: dean-coakley <dean.s.coakley@gmail.com>
Date: Tue, 14 Aug 2018 16:54:35 +0100
Subject: [PATCH] Helm: Fix report-status/leader-election docs

---
 helm-chart/README.md                            | 6 +++---
 helm-chart/templates/controller-daemonset.yaml  | 2 +-
 helm-chart/templates/controller-deployment.yaml | 2 +-
 helm-chart/values-plus.yaml                     | 1 -
 helm-chart/values.yaml                          | 1 -
 5 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/helm-chart/README.md b/helm-chart/README.md
index 63642192e0..35a0d3e33f 100644
--- a/helm-chart/README.md
+++ b/helm-chart/README.md
@@ -81,9 +81,9 @@ Parameter | Description | Default
 `controller.useIngressClassOnly` | Ignore Ingress resources without the `"kubernetes.io/ingress.class"` annotation. | false
 `controller.watchNamespace` | Namespace to watch for Ingress resources. By default the Ingress controller watches all namespaces. | ""
 `controller.healthStatus` | Add a location "/nginx-health" to the default server. The location responds with the 200 status code for any request. Useful for external health-checking of the Ingress controller. | false
-`controller.reportIngressStatus.enable` | Update the address field in the status of Ingresses resources. Requires `controller.reportIngressStatus.externalService`, or `controller.config.entries.external-status-address` to be set. **Note:** `controller.reportIngressStatus.externalService` takes preference if both are set. | false
-`controller.reportIngressStatus.externalService` | Specifies the name of the service with the type LoadBalancer through which the Ingress controller pods are exposed externally. The external address of the service is used when reporting the status of Ingress resources. `controller.reportIngressStatus.enable` must be set to `true`. | nginx-ingress
-`controller.reportIngressStatus.enableLeaderElection`. | Enable Leader election to avoid multiple replicas of the controller reporting the status of Ingress resources. `controller.reportIngressStatus.enable` must be set to `true`. | true
+`controller.reportIngressStatus.enable` | Update the address field in the status of Ingresses resources with an external address of the Ingress controller. You must also specify the source of the external address either through an external service via `controller.reportIngressStatus.externalService` or the `external-status-address` entry in the ConfigMap via `controller.config.entries`. **Note:** `controller.config.entries.external-status-address` takes precedence if both are set. | false
+`controller.reportIngressStatus.externalService` | Specifies the name of the service with the type LoadBalancer through which the Ingress controller is exposed externally. The external address of the service is used when reporting the status of Ingress resources. `controller.reportIngressStatus.enable` must be set to `true`. | nginx-ingress
+`controller.reportIngressStatus.enableLeaderElection` | Enable Leader election to avoid multiple replicas of the controller reporting the status of Ingress resources. `controller.reportIngressStatus.enable` must be set to `true`. | true
 `rbac.create` | Configures RBAC. | true
 `prometheues.create` | Deploys a Prometheus exporter container within the Ingress controller pod. Requires NGINX Plus. `controller.nginxplus` must be set to `true`. | false
 `prometheus.port` | Configures the port to scrape the metrics. | 9113
diff --git a/helm-chart/templates/controller-daemonset.yaml b/helm-chart/templates/controller-daemonset.yaml
index d2f1e6ab69..c561e71b10 100644
--- a/helm-chart/templates/controller-daemonset.yaml
+++ b/helm-chart/templates/controller-daemonset.yaml
@@ -86,7 +86,7 @@ spec:
 {{- if .Values.controller.reportIngressStatus.enable }}
           - -report-ingress-status
 {{- if .Values.controller.reportIngressStatus.externalService }}
-          - -external-service="{{ .Values.controller.reportIngressStatus.externalService }}"
+          - -external-service={{ .Values.controller.reportIngressStatus.externalService }}
 {{- end }}
 {{ if .Values.controller.reportIngressStatus.enableLeaderElection }}
           - -enable-leader-election
diff --git a/helm-chart/templates/controller-deployment.yaml b/helm-chart/templates/controller-deployment.yaml
index 80db16df98..a37300a10b 100644
--- a/helm-chart/templates/controller-deployment.yaml
+++ b/helm-chart/templates/controller-deployment.yaml
@@ -72,7 +72,7 @@ spec:
 {{- if .Values.controller.reportIngressStatus.enable }}
           - -report-ingress-status
 {{- if .Values.controller.reportIngressStatus.externalService }}
-          - -external-service="{{ .Values.controller.reportIngressStatus.externalService }}"
+          - -external-service={{ .Values.controller.reportIngressStatus.externalService }}
 {{- end }}
 {{- if .Values.controller.reportIngressStatus.enableLeaderElection }}
           - -enable-leader-election
diff --git a/helm-chart/values-plus.yaml b/helm-chart/values-plus.yaml
index 1cc28b413b..4ec54b614f 100644
--- a/helm-chart/values-plus.yaml
+++ b/helm-chart/values-plus.yaml
@@ -14,7 +14,6 @@ controller:
     secret: # <namespace>/<secret_name>
   config:
     entries: {}
-      # external-status-address: "1.2.3.4"
   nodeSelector: {}
   terminationGracePeriodSeconds: 30
   tolerations: ""
diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml
index 8f3add6279..8fc9a3331c 100644
--- a/helm-chart/values.yaml
+++ b/helm-chart/values.yaml
@@ -9,7 +9,6 @@ controller:
     pullPolicy: IfNotPresent
   config:
     entries: {}
-      # external-status-address: "1.2.3.4"
   # It is recommended to use your own TLS certificate and key
   defaultTLS:
     cert: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURTVENDQWpHZ0F3SUJBZ0lKQUs5L2NDNWZocDJHTUEwR0NTcUdTSWIzRFFFQkJRVUFNQ0V4SHpBZEJnTlYKQkFNVEZrNUhTVTVZU1c1bmNtVnpjME52Ym5SeWIyeHNaWEl3SGhjTk1UY3dPRE14TVRBeE16UTRXaGNOTVRndwpPRE14TVRBeE16UTRXakFoTVI4d0hRWURWUVFERXhaT1IwbE9XRWx1WjNKbGMzTkRiMjUwY205c2JHVnlNSUlCCklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUF0bXhhMDhadExIaWxleWhOUWN5OUl4ankKWTBYdy9CRmZvM3duMDRsSXRoaGRxbkZ3NTZIVG1RVjIvbnEyRUxMdTNoejNjc3Urc3M5WFEzL3BrbXVwTEE5TApuaVVRZFVNcER4VlE1VFFKRW5CanJ5aXc4RWFlcEp4NUNCYVB5V3ZSZkpPb0pFSW56ZmNaYnE4OEVmQklYOHdtClFCa0xlcnFTVmRYWjBXR3FINVVQVlVZMVBqZXBqSXAyZ0NvbDRMUjM1aHRlSk9OMmZVTEF6cmRGMDBDT092WGsKUzgwRGw5eHdoUkVwVWVySGNuNXZod3BJazNkY3FNS3BxWTY2elF3dStMcFJEM3ZVWjR0eC9VYnlUdStkMkdhVwpWaG1RLy85RmtzUzVBS1d2ZXkrK3pPUTFDZTAxNzh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