Allow chart to expose extra ports for default backend
Signed-off-by: Ricardo Lopes <ricardoapl.dev@gmail.com>
This commit is contained in:
parent
4d5db854d1
commit
afcd6b31ab
3 changed files with 17 additions and 0 deletions
|
@ -93,6 +93,13 @@ spec:
|
|||
- name: http
|
||||
containerPort: {{ .Values.defaultBackend.port }}
|
||||
protocol: TCP
|
||||
{{- if .Values.defaultBackend.service.extraPorts }}
|
||||
{{- range .Values.defaultBackend.service.extraPorts }}
|
||||
- name: {{ .name }}
|
||||
containerPort: {{ .targetPort }}
|
||||
protocol: {{ .protocol }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.extraVolumeMounts }}
|
||||
volumeMounts: {{- toYaml .Values.defaultBackend.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
|
|
|
@ -38,6 +38,9 @@ spec:
|
|||
{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version }}
|
||||
appProtocol: http
|
||||
{{- end }}
|
||||
{{- if .Values.defaultBackend.service.extraPorts }}
|
||||
{{ toYaml .Values.defaultBackend.service.extraPorts | nindent 4 }}
|
||||
{{- end}}
|
||||
selector:
|
||||
{{- include "ingress-nginx.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: default-backend
|
||||
|
|
|
@ -1176,6 +1176,13 @@ defaultBackend:
|
|||
loadBalancerSourceRanges: []
|
||||
servicePort: 80
|
||||
type: ClusterIP
|
||||
|
||||
# -- Additional ports to expose for defaultBackend pods
|
||||
extraPorts: []
|
||||
# - name: metrics
|
||||
# port: 9090
|
||||
# protocol: HTTP
|
||||
# targetPort: 9090
|
||||
priorityClassName: ""
|
||||
# -- Labels to be added to the default backend resources
|
||||
labels: {}
|
||||
|
|
Loading…
Reference in a new issue