48 lines
1.3 KiB
Smarty
48 lines
1.3 KiB
Smarty
|
{{- define "lib.parts.container" -}}
|
||
|
{{/*
|
||
|
create the environment varable list
|
||
|
*/}}
|
||
|
- name: {{ .Chart.Name }}
|
||
|
securityContext:
|
||
|
{{- toYaml .Values.securityContext | nindent 4 }}
|
||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||
|
{{- with .Values.controller.command }}
|
||
|
command: {{ toYaml . | nindent 4}}
|
||
|
{{- end }}
|
||
|
{{- with .Values.controller.args }}
|
||
|
args: {{ toYaml . | nindent 4 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.controller.lifecycle }}
|
||
|
lifecycle:
|
||
|
{{- toYaml . | nindent 4 }}
|
||
|
{{- end }}
|
||
|
ports:
|
||
|
{{- range $name, $values := .Values.service -}}
|
||
|
{{- if $values.enabled -}}
|
||
|
{{- range $k, $v := $values.ports }}
|
||
|
- name: {{ $k }}
|
||
|
containerPort: {{ default $v.port $v.targetPort }}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|
||
|
{{- end }}
|
||
|
env:
|
||
|
{{- include "lib.parts.env" . | nindent 4 -}}
|
||
|
{{- with .Values.livenessProbe }}
|
||
|
livenessProbe:
|
||
|
{{- toYaml . | nindent 4 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.readinessProbe }}
|
||
|
readinessProbe:
|
||
|
{{- toYaml . | nindent 4 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.resources }}
|
||
|
resources:
|
||
|
{{- toYaml . | nindent 4 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.volumeMounts }}
|
||
|
volumeMounts:
|
||
|
{{- toYaml . | nindent 4 }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|