[Helm] allow configuring controller container name

Signed-off-by: amirschw <24677563+amirschw@users.noreply.github.com>
This commit is contained in:
amirschw 2021-04-13 14:48:34 +03:00
parent f5cfd5730c
commit bee7360ca4
3 changed files with 8 additions and 5 deletions

View file

@ -26,10 +26,10 @@ spec:
template: template:
metadata: metadata:
{{- if .Values.controller.podAnnotations }} {{- if .Values.controller.podAnnotations }}
annotations: annotations:
{{- range $key, $value := .Values.controller.podAnnotations }} {{- range $key, $value := .Values.controller.podAnnotations }}
{{ $key }}: {{ $value | quote }} {{ $key }}: {{ $value | quote }}
{{- end }} {{- end }}
{{- end }} {{- end }}
labels: labels:
{{- include "ingress-nginx.selectorLabels" . | nindent 8 }} {{- include "ingress-nginx.selectorLabels" . | nindent 8 }}
@ -62,7 +62,7 @@ spec:
{{- end }} {{- end }}
{{- end }} {{- end }}
containers: containers:
- name: controller - name: {{ .Values.controller.containerName }}
{{- with .Values.controller.image }} {{- with .Values.controller.image }}
image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}"
{{- end }} {{- end }}

View file

@ -30,7 +30,7 @@ spec:
template: template:
metadata: metadata:
{{- if .Values.controller.podAnnotations }} {{- if .Values.controller.podAnnotations }}
annotations: annotations:
{{- range $key, $value := .Values.controller.podAnnotations }} {{- range $key, $value := .Values.controller.podAnnotations }}
{{ $key }}: {{ $value | quote }} {{ $key }}: {{ $value | quote }}
{{- end }} {{- end }}
@ -66,7 +66,7 @@ spec:
{{- end }} {{- end }}
{{- end }} {{- end }}
containers: containers:
- name: controller - name: {{ .Values.controller.containerName }}
{{- with .Values.controller.image }} {{- with .Values.controller.image }}
image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}" image: "{{.repository}}:{{ .tag }}{{- if (.digest) -}} @{{.digest}} {{- end -}}"
{{- end }} {{- end }}

View file

@ -21,6 +21,9 @@ controller:
# Use an existing PSP instead of creating one # Use an existing PSP instead of creating one
existingPsp: "" existingPsp: ""
# Configures the controller container name
containerName: controller
# Configures the ports the nginx-controller listens on # Configures the ports the nginx-controller listens on
containerPort: containerPort:
http: 80 http: 80