[stable/nginx-ingress] Allow to configure source IP preservation on Kubernetes 1.7 (#1570)

* Set externalTrafficPolicy and healthCheckNodePort

* Rebase & address PR review

* Remove duplicate fields

* Final cleanup
This commit is contained in:
Maciej Strzelecki
2017-09-02 09:52:46 -05:00
committed by Michael Goodness
parent 918025ce64
commit 54f070577b
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: nginx-ingress
version: 0.8.2
version: 0.8.3
appVersion: 0.9.0-beta.12
description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration.
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Nginx_logo.svg/500px-Nginx_logo.svg.png
@@ -25,8 +25,11 @@ spec:
loadBalancerSourceRanges:
{{ toYaml .Values.controller.service.loadBalancerSourceRanges | indent 4 }}
{{- end }}
{{- if .Values.controller.service.externalTrafficPolicy }}
{{- if and (ge .Capabilities.KubeVersion.Minor "7") (.Values.controller.service.externalTrafficPolicy) }}
externalTrafficPolicy: "{{ .Values.controller.service.externalTrafficPolicy }}"
{{- end }}
{{- if and (ge .Capabilities.KubeVersion.Minor "7") (.Values.controller.service.healthCheckNodePort) }}
healthCheckNodePort: {{ .Values.controller.service.healthCheckNodePort }}
{{- end }}
ports:
- name: http
+2
View File
@@ -90,6 +90,8 @@ controller:
## Ref: https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typeloadbalancer
externalTrafficPolicy: ""
healthCheckNodePort: 0
targetPorts:
http: 80
https: 443