Skip to content

Commit

Permalink
Making Kube service appProtocol field optional (#7873)
Browse files Browse the repository at this point in the history
  • Loading branch information
admgolovin authored Nov 26, 2021
1 parent cabc6ec commit 5a5bff1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions charts/ingress-nginx/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This file documents all notable changes to [ingress-nginx](https://github.com/kubernetes/ingress-nginx) Helm Chart. The release numbering uses [semantic versioning](http://semver.org).

### 4.0.11

- [7873] https://github.com/kubernetes/ingress-nginx/pull/7873 Makes the [appProtocol](https://kubernetes.io/docs/concepts/services-networking/_print/#application-protocol) field optional.

### 4.0.10

- [7964] https://github.com/kubernetes/ingress-nginx/pull/7964 Update controller version to v1.1.0
Expand Down
2 changes: 1 addition & 1 deletion charts/ingress-nginx/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: ingress-nginx
# When the version is modified, make sure the artifacthub.io/changes list is updated
# Also update CHANGELOG.md
version: 4.0.10
version: 4.0.11
appVersion: 1.1.0
home: https://github.com/kubernetes/ingress-nginx
description: Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer
Expand Down
4 changes: 2 additions & 2 deletions charts/ingress-nginx/templates/controller-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
port: {{ .Values.controller.service.ports.http }}
protocol: TCP
targetPort: {{ .Values.controller.service.targetPorts.http }}
{{- if semverCompare ">=1.20" .Capabilities.KubeVersion.Version }}
{{- if and (semverCompare ">=1.20" .Capabilities.KubeVersion.Version) (.Values.controller.service.appProtocol) }}
appProtocol: http
{{- end }}
{{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.http))) }}
Expand All @@ -66,7 +66,7 @@ spec:
port: {{ .Values.controller.service.ports.https }}
protocol: TCP
targetPort: {{ .Values.controller.service.targetPorts.https }}
{{- if semverCompare ">=1.20" .Capabilities.KubeVersion.Version }}
{{- if and (semverCompare ">=1.20" .Capabilities.KubeVersion.Version) (.Values.controller.service.appProtocol) }}
appProtocol: https
{{- end }}
{{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.https))) }}
Expand Down
8 changes: 8 additions & 0 deletions charts/ingress-nginx/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,14 @@ controller:
service:
enabled: true

## If enabled is adding an appProtocol option for Kubernetes service. An appProtocol field replacing annotations that were
## using for setting a backend protocol. Here is an example for AWS: service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
## It allows choosing the protocol for each backend specified in the Kubernetes service.
## See the following GitHub issue for more details about the purpose: https://github.com/kubernetes/kubernetes/issues/40244
## Will be ignored for Kubernetes versions older than 1.20
##
appProtocol: true

annotations: {}
labels: {}
# clusterIP: ""
Expand Down

0 comments on commit 5a5bff1

Please sign in to comment.