Skip to content

Commit 372abc4

Browse files
authored
Add nginx-status-allow-cidrs and service externalIPs to Helm chart (#398)
* Add missing options to helm chart templates * Add nginxStatusAllowCidrs cli argument to deployment template * Add externalIPs to service template * Update helm chart with new config options * Add Note about nginxStatusAllowCidrs cli argument * Add Note about service externalIPs * Bump helm chart version
1 parent 097446f commit 372abc4

File tree

6 files changed

+12
-2
lines changed

6 files changed

+12
-2
lines changed

deployments/helm-chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: nginx-ingress
2-
version: 0.1.3
2+
version: 0.1.4
33
appVersion: edge
44
description: NGINX Ingress Controller
55
sources:

deployments/helm-chart/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,15 @@ Parameter | Description | Default
7777
`controller.service.externalTrafficPolicy` | The externalTrafficPolicy of the service. The value Local preserves the client source IP. | Local
7878
`controller.service.annotations` | The annotations of the Ingress controller service. | { }
7979
`controller.service.loadBalancerIP` | The static IP address for the load balancer. Requires `controller.service.type` set to `LoadBalancer`. | None
80+
`controller.service.externalIPs` | The list of external IPs for the Ingress controller service. | []
8081
`controller.serviceAccountName` | The serviceAccountName of the Ingress controller pods. Used for RBAC. | nginx-ingress
8182
`controller.ingressClass` | A class of the Ingress controller. The Ingress controller only processes Ingress resources that belong to its class - i.e. have the annotation `"kubernetes.io/ingress.class"` equal to the class. Additionally, the Ingress controller processes Ingress resources that do not have that annotation which can be disabled by setting the "-use-ingress-class-only" flag. | nginx
8283
`controller.useIngressClassOnly` | Ignore Ingress resources without the `"kubernetes.io/ingress.class"` annotation. | false
8384
`controller.watchNamespace` | Namespace to watch for Ingress resources. By default the Ingress controller watches all namespaces. | ""
8485
`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
85-
`controller.nginxStatus.enable` | Enable the NGINX stub_status, or the NGINX Plus API. | true
86+
`controller.nginxStatus.enable` | Enable the NGINX stub_status, or the NGINX Plus API. | true
8687
`controller.nginxStatus.port` | Set the port where the NGINX stub_status or the NGINX Plus API is exposed. | 8080
88+
`controller.nginxStatus.allowCidrs` | Whitelist IPv4 IP/CIDR blocks to allow access to NGINX stub_status or the NGINX Plus API. Separate multiple IP/CIDR by commas. | 127.0.0.1
8789
`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
8890
`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
8991
`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

deployments/helm-chart/templates/controller-daemonset.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ spec:
7474
{{- if .Values.controller.nginxStatus.enable }}
7575
- -nginx-status
7676
- -nginx-status-port={{ .Values.controller.nginxStatus.port }}
77+
- -nginx-status-allow-cidrs={{ .Values.controller.nginxStatus.allowCidrs }}
7778
{{- end }}
7879
{{- if .Values.controller.reportIngressStatus.enable }}
7980
- -report-ingress-status

deployments/helm-chart/templates/controller-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ spec:
6060
{{- if .Values.controller.nginxStatus.enable }}
6161
- -nginx-status
6262
- -nginx-status-port={{ .Values.controller.nginxStatus.port }}
63+
- -nginx-status-allow-cidrs={{ .Values.controller.nginxStatus.allowCidrs }}
6364
{{- end }}
6465
{{- if .Values.controller.reportIngressStatus.enable }}
6566
- -report-ingress-status

deployments/helm-chart/templates/controller-service.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,8 @@ spec:
3333
name: https
3434
selector:
3535
app: {{ .Values.controller.name | trunc 63 }}
36+
{{- if .Values.controller.service.externalIPs }}
37+
externalIPs:
38+
{{ toYaml .Values.controller.service.externalIPs | indent 4 }}
39+
{{- end }}
3640
{{- end }}

deployments/helm-chart/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ controller:
2525
nginxStatus:
2626
enable: true
2727
port: 8080
28+
allowCidrs: "127.0.0.1"
2829
service:
2930
create: true
3031
type: LoadBalancer
3132
externalTrafficPolicy: Local
3233
annotations: {}
3334
loadBalancerIP: ""
35+
externalIPs: []
3436
serviceAccountName: nginx-ingress
3537
reportIngressStatus:
3638
enable: true

0 commit comments

Comments
 (0)