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

Add report-status & leader-election to Helm chart #335

Merged
merged 8 commits into from
Aug 16, 2018
Merged
2 changes: 1 addition & 1 deletion helm-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: nginx-ingress
version: 0.1.1
version: 0.1.2
appVersion: 1.3.0
description: NGINX Ingress Controller
sources:
Expand Down
5 changes: 4 additions & 1 deletion helm-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
--- | --- | ---
Expand Down Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions helm-chart/templates/controller-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down
9 changes: 9 additions & 0 deletions helm-chart/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down
3 changes: 3 additions & 0 deletions helm-chart/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/values-plus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ controller:
externalTrafficPolicy: Local
annotations: {}
serviceAccountName: nginx-ingress
reportIngressStatus:
enable: true
externalService: nginx-ingress
enableLeaderElection: true
rbac:
create: true
prometheus:
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,9 @@ controller:
externalTrafficPolicy: Local
annotations: {}
serviceAccountName: nginx-ingress
reportIngressStatus:
enable: true
externalService: nginx-ingress
enableLeaderElection: true
rbac:
create: true