diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml index ab60e62c58..f7a06641ef 100644 --- a/helm-chart/Chart.yaml +++ b/helm-chart/Chart.yaml @@ -1,5 +1,5 @@ name: nginx-ingress -version: 0.1.1 +version: 0.1.2 appVersion: 1.3.0 description: NGINX Ingress Controller sources: diff --git a/helm-chart/README.md b/helm-chart/README.md index 9cfcb1f97f..f55de8db91 100644 --- a/helm-chart/README.md +++ b/helm-chart/README.md @@ -53,7 +53,7 @@ The command removes all the Kubernetes components associated with the chart and ## Configuration -The following tables lists the configurable parameters of the NGINX Ingress controller chart and their default values. +The following tables lists the configurable parameters of the NGINX Ingress controller chart and their default values. Parameter | Description | Default --- | --- | --- @@ -81,6 +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 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. | true +`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 ed54366a5c..c561e71b10 100644 --- a/helm-chart/templates/controller-daemonset.yaml +++ b/helm-chart/templates/controller-daemonset.yaml @@ -83,6 +83,15 @@ spec: {{- if .Values.controller.healthStatus }} - -health-status {{- end }} +{{- if .Values.controller.reportIngressStatus.enable }} + - -report-ingress-status +{{- if .Values.controller.reportIngressStatus.externalService }} + - -external-service={{ .Values.controller.reportIngressStatus.externalService }} +{{- end }} +{{ if .Values.controller.reportIngressStatus.enableLeaderElection }} + - -enable-leader-election +{{- end }} +{{- end }} {{- if .Values.prometheus }} {{- if and (.Values.controller.nginxplus) (.Values.prometheus.create) }} - image: "{{ .Values.prometheus.image.repository }}:{{ .Values.prometheus.image.tag }}" diff --git a/helm-chart/templates/controller-deployment.yaml b/helm-chart/templates/controller-deployment.yaml index 1c47ce53d1..a37300a10b 100644 --- a/helm-chart/templates/controller-deployment.yaml +++ b/helm-chart/templates/controller-deployment.yaml @@ -69,6 +69,15 @@ spec: {{- if .Values.controller.healthStatus }} - -health-status {{- end }} +{{- if .Values.controller.reportIngressStatus.enable }} + - -report-ingress-status +{{- if .Values.controller.reportIngressStatus.externalService }} + - -external-service={{ .Values.controller.reportIngressStatus.externalService }} +{{- end }} +{{- if .Values.controller.reportIngressStatus.enableLeaderElection }} + - -enable-leader-election +{{- end }} +{{- end }} {{- if .Values.prometheus }} {{- if and (.Values.controller.nginxplus) (.Values.prometheus.create) }} - image: "{{ .Values.prometheus.image.repository }}:{{ .Values.prometheus.image.tag }}" diff --git a/helm-chart/templates/rbac.yaml b/helm-chart/templates/rbac.yaml index 79ea8acb44..10c0db929b 100644 --- a/helm-chart/templates/rbac.yaml +++ b/helm-chart/templates/rbac.yaml @@ -54,14 +54,17 @@ rules: resources: - ingresses verbs: + - get - list - watch +{{- if .Values.controller.reportIngressStatus.enable }} - apiGroups: - "extensions" resources: - ingresses/status verbs: - update +{{- end }} --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1beta1 diff --git a/helm-chart/values-plus.yaml b/helm-chart/values-plus.yaml index de94f4e57f..6e7ba5902a 100644 --- a/helm-chart/values-plus.yaml +++ b/helm-chart/values-plus.yaml @@ -28,6 +28,10 @@ controller: externalTrafficPolicy: Local annotations: {} serviceAccountName: nginx-ingress + reportIngressStatus: + enable: true + externalService: nginx-ingress + enableLeaderElection: true rbac: create: true prometheus: diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 145eedb7eb..908fdb5a47 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -28,5 +28,9 @@ controller: externalTrafficPolicy: Local annotations: {} serviceAccountName: nginx-ingress + reportIngressStatus: + enable: true + externalService: nginx-ingress + enableLeaderElection: true rbac: create: true