Support ipFamilyPolicy and ipFamilies fields in Helm Chart (#7651)

* Add support to ipFamilyPolicy and ipFamilies fields in Helm chart

As stated in the prerequisites' session of https://kubernetes.io/docs/concepts/services-networking/dual-stack/, in order to use Kubernetes IPv4/IPv6 dual stack, v1.20 is needed. This commit aims in supporting these dual-stack-ness in ingress-nginx's chart.

Signed-off-by: jaehnri <joao.henri.cr@gmail.com>

* Standardize documentation with two '#'s

Signed-off-by: jaehnri <joao.henri.cr@gmail.com>

* Bump Helm chart version to 4.1.0

Signed-off-by: jaehnri <joao.henri.cr@gmail.com>

* Update Helm Chart changelog with 4.1.0 description

Signed-off-by: jaehnri <joao.henri.cr@gmail.com>

* Revert Helm Chart bump and remove CHANGELOG

As there will be more things in the release, in the review of this PR, it was asked to revert the bumps:
https://github.com/kubernetes/ingress-nginx/pull/7651#pullrequestreview-757311449

Signed-off-by: jaehnri <joao.henri.cr@gmail.com>
This commit is contained in:
João Henri 2021-10-12 17:38:00 -03:00 committed by GitHub
parent 9da4d87d0c
commit 001ce778b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 7 deletions

View file

@ -36,6 +36,16 @@ spec:
{{- end }}
{{- if .Values.controller.service.healthCheckNodePort }}
healthCheckNodePort: {{ .Values.controller.service.healthCheckNodePort }}
{{- end }}
{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version -}}
{{- if .Values.controller.service.ipFamilyPolicy }}
ipFamilyPolicy: {{ .Values.controller.service.ipFamilyPolicy }}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version -}}
{{- if .Values.controller.service.ipFamilies }}
ipFamilies: {{ toYaml .Values.controller.service.ipFamilies | nindent 4 }}
{{- end }}
{{- end }}
ports:
{{- $setNodePorts := (or (eq .Values.controller.service.type "NodePort") (eq .Values.controller.service.type "LoadBalancer")) }}

View file

@ -444,20 +444,31 @@ controller:
enableHttp: true
enableHttps: true
## Set external traffic policy to: "Local" to preserve source IP on
## providers supporting it
## Set external traffic policy to: "Local" to preserve source IP on providers supporting it.
## Ref: https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-typeloadbalancer
# externalTrafficPolicy: ""
# Must be either "None" or "ClientIP" if set. Kubernetes will default to "None".
# Ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
## Must be either "None" or "ClientIP" if set. Kubernetes will default to "None".
## Ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
# sessionAffinity: ""
# specifies the health check node port (numeric port number) for the service. If healthCheckNodePort isnt specified,
# the service controller allocates a port from your clusters NodePort range.
# Ref: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
## Specifies the health check node port (numeric port number) for the service. If healthCheckNodePort isnt specified,
## the service controller allocates a port from your clusters NodePort range.
## Ref: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
# healthCheckNodePort: 0
## Represents the dual-stack-ness requested or required by this Service. Possible values are
## SingleStack, PreferDualStack or RequireDualStack.
## The ipFamilies and clusterIPs fields depend on the value of this field.
## Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
ipFamilyPolicy: "SingleStack"
## List of IP families (e.g. IPv4, IPv6) assigned to the service. This field is usually assigned automatically
## based on cluster configuration and the ipFamilyPolicy field.
## Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
ipFamilies:
- IPv4
ports:
http: 80
https: 443