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
|
- name: http
|
||||||
containerPort: {{ .Values.defaultBackend.port }}
|
containerPort: {{ .Values.defaultBackend.port }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
{{- if .Values.defaultBackend.service.extraPorts }}
|
||||||
|
{{- range .Values.defaultBackend.service.extraPorts }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
containerPort: {{ .targetPort }}
|
||||||
|
protocol: {{ .protocol }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.defaultBackend.extraVolumeMounts }}
|
{{- if .Values.defaultBackend.extraVolumeMounts }}
|
||||||
volumeMounts: {{- toYaml .Values.defaultBackend.extraVolumeMounts | nindent 12 }}
|
volumeMounts: {{- toYaml .Values.defaultBackend.extraVolumeMounts | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -38,6 +38,9 @@ spec:
|
||||||
{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version }}
|
{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version }}
|
||||||
appProtocol: http
|
appProtocol: http
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.defaultBackend.service.extraPorts }}
|
||||||
|
{{ toYaml .Values.defaultBackend.service.extraPorts | nindent 4 }}
|
||||||
|
{{- 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
|
||||||
|
|
|
@ -1176,6 +1176,13 @@ defaultBackend:
|
||||||
loadBalancerSourceRanges: []
|
loadBalancerSourceRanges: []
|
||||||
servicePort: 80
|
servicePort: 80
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|
||||||
|
# -- Additional ports to expose for defaultBackend pods
|
||||||
|
extraPorts: []
|
||||||
|
# - name: metrics
|
||||||
|
# port: 9090
|
||||||
|
# protocol: HTTP
|
||||||
|
# targetPort: 9090
|
||||||
priorityClassName: ""
|
priorityClassName: ""
|
||||||
# -- Labels to be added to the default backend resources
|
# -- Labels to be added to the default backend resources
|
||||||
labels: {}
|
labels: {}
|
||||||
|
|
Loading…
Reference in a new issue