diff --git a/deployments/helm-chart/Chart.yaml b/deployments/helm-chart/Chart.yaml index 247ad1250c..1da2d0d6a4 100644 --- a/deployments/helm-chart/Chart.yaml +++ b/deployments/helm-chart/Chart.yaml @@ -1,5 +1,5 @@ name: nginx-ingress -version: 0.3.0 +version: 0.3.1 appVersion: edge description: NGINX Ingress Controller sources: diff --git a/deployments/helm-chart/README.md b/deployments/helm-chart/README.md index b69e785374..c2d4c87c51 100644 --- a/deployments/helm-chart/README.md +++ b/deployments/helm-chart/README.md @@ -78,7 +78,8 @@ Parameter | Description | Default `controller.service.type` | The type of service to create for the Ingress controller. | LoadBalancer `controller.service.externalTrafficPolicy` | The externalTrafficPolicy of the service. The value Local preserves the client source IP. | Local `controller.service.annotations` | The annotations of the Ingress controller service. | { } -`controller.service.loadBalancerIP` | The static IP address for the load balancer. Requires `controller.service.type` set to `LoadBalancer`. | None +`controller.service.loadBalancerIP` | The static IP address for the load balancer. Requires `controller.service.type` set to `LoadBalancer`. The cloud provider must support this feature. | None +`controller.service.loadBalancerSourceRanges` | The IP ranges (CIDR) that are allowed to access the load balancer. Requires `controller.service.type` set to `LoadBalancer`. The cloud provider must support this feature. | [] `controller.service.externalIPs` | The list of external IPs for the Ingress controller service. | [] `controller.serviceAccount.name` | The name of the service account of the Ingress controller pods. Used for RBAC. | nginx-ingress `controller.serviceAccount.imagePullSecrets` | The names of the secrets containing docker registry credentials. | [] diff --git a/deployments/helm-chart/templates/controller-service.yaml b/deployments/helm-chart/templates/controller-service.yaml index fff9e5e89d..a766b0308c 100644 --- a/deployments/helm-chart/templates/controller-service.yaml +++ b/deployments/helm-chart/templates/controller-service.yaml @@ -17,9 +17,15 @@ spec: {{- if .Values.controller.service.externalTrafficPolicy }} externalTrafficPolicy: {{ .Values.controller.service.externalTrafficPolicy }} {{- end }} - {{- if (eq .Values.controller.service.type "LoadBalancer") .Values.controller.service.loadBalancerIP }} +{{- end }} +{{- if eq .Values.controller.service.type "LoadBalancer" }} + {{- if .Values.controller.service.loadBalancerIP }} loadBalancerIP: {{ .Values.controller.service.loadBalancerIP }} {{- end }} + {{- if .Values.controller.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.controller.service.loadBalancerSourceRanges | indent 4 }} + {{- end }} {{- end }} type: {{ .Values.controller.service.type }} ports: diff --git a/deployments/helm-chart/values.yaml b/deployments/helm-chart/values.yaml index b58eec0a75..036cbaf3a0 100644 --- a/deployments/helm-chart/values.yaml +++ b/deployments/helm-chart/values.yaml @@ -35,6 +35,7 @@ controller: annotations: {} loadBalancerIP: "" externalIPs: [] + loadBalancerSourceRanges: [] serviceAccount: name: nginx-ingress imagePullSecrets: []