Add appProtocol field to all ServicePorts (#7493)
Minor update to the helm chart to set the [appProtocol][1] field on all http / https ports defined in the various services created by the helm chart: - http and https for controller-service - http and https for controller-service-internal - https for controler-service-webhook - http for default-backend-service These are only added in kubernetes >= 1.20, which is when this feature became stable. [1]: https://kubernetes.io/docs/concepts/services-networking/service/#application-protocol
This commit is contained in:
parent
f8372dbce9
commit
623436ef65
4 changed files with 18 additions and 0 deletions
|
@ -32,6 +32,9 @@ spec:
|
||||||
port: {{ .Values.controller.service.ports.http }}
|
port: {{ .Values.controller.service.ports.http }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: {{ .Values.controller.service.targetPorts.http }}
|
targetPort: {{ .Values.controller.service.targetPorts.http }}
|
||||||
|
{{- if semverCompare ">=1.20" .Capabilities.KubeVersion.Version }}
|
||||||
|
appProtocol: http
|
||||||
|
{{- end }}
|
||||||
{{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.http))) }}
|
{{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.http))) }}
|
||||||
nodePort: {{ .Values.controller.service.nodePorts.http }}
|
nodePort: {{ .Values.controller.service.nodePorts.http }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -41,6 +44,9 @@ spec:
|
||||||
port: {{ .Values.controller.service.ports.https }}
|
port: {{ .Values.controller.service.ports.https }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: {{ .Values.controller.service.targetPorts.https }}
|
targetPort: {{ .Values.controller.service.targetPorts.https }}
|
||||||
|
{{- if semverCompare ">=1.20" .Capabilities.KubeVersion.Version }}
|
||||||
|
appProtocol: https
|
||||||
|
{{- end }}
|
||||||
{{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.https))) }}
|
{{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.https))) }}
|
||||||
nodePort: {{ .Values.controller.service.nodePorts.https }}
|
nodePort: {{ .Values.controller.service.nodePorts.https }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -28,6 +28,9 @@ spec:
|
||||||
- name: https-webhook
|
- name: https-webhook
|
||||||
port: 443
|
port: 443
|
||||||
targetPort: webhook
|
targetPort: webhook
|
||||||
|
{{- if semverCompare ">=1.20" .Capabilities.KubeVersion.Version }}
|
||||||
|
appProtocol: https
|
||||||
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
{{- include "ingress-nginx.selectorLabels" . | nindent 4 }}
|
{{- include "ingress-nginx.selectorLabels" . | nindent 4 }}
|
||||||
app.kubernetes.io/component: controller
|
app.kubernetes.io/component: controller
|
||||||
|
|
|
@ -44,6 +44,9 @@ spec:
|
||||||
port: {{ .Values.controller.service.ports.http }}
|
port: {{ .Values.controller.service.ports.http }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: {{ .Values.controller.service.targetPorts.http }}
|
targetPort: {{ .Values.controller.service.targetPorts.http }}
|
||||||
|
{{- if semverCompare ">=1.20" .Capabilities.KubeVersion.Version }}
|
||||||
|
appProtocol: http
|
||||||
|
{{- end }}
|
||||||
{{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.http))) }}
|
{{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.http))) }}
|
||||||
nodePort: {{ .Values.controller.service.nodePorts.http }}
|
nodePort: {{ .Values.controller.service.nodePorts.http }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -53,6 +56,9 @@ spec:
|
||||||
port: {{ .Values.controller.service.ports.https }}
|
port: {{ .Values.controller.service.ports.https }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: {{ .Values.controller.service.targetPorts.https }}
|
targetPort: {{ .Values.controller.service.targetPorts.https }}
|
||||||
|
{{- if semverCompare ">=1.20" .Capabilities.KubeVersion.Version }}
|
||||||
|
appProtocol: https
|
||||||
|
{{- end }}
|
||||||
{{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.https))) }}
|
{{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.https))) }}
|
||||||
nodePort: {{ .Values.controller.service.nodePorts.https }}
|
nodePort: {{ .Values.controller.service.nodePorts.https }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -29,6 +29,9 @@ spec:
|
||||||
port: {{ .Values.defaultBackend.service.servicePort }}
|
port: {{ .Values.defaultBackend.service.servicePort }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: http
|
targetPort: http
|
||||||
|
{{- if semverCompare ">=1.20" .Capabilities.KubeVersion.Version }}
|
||||||
|
appProtocol: http
|
||||||
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
{{- include "ingress-nginx.selectorLabels" . | nindent 4 }}
|
{{- include "ingress-nginx.selectorLabels" . | nindent 4 }}
|
||||||
app.kubernetes.io/component: default-backend
|
app.kubernetes.io/component: default-backend
|
||||||
|
|
Loading…
Reference in a new issue