helm-charts/charts/library/common/templates/lib/controller/_mainContainer.tpl
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs bce21cffef
feat(common): Release version 1.2.1 (#95)
* fix(common): Clean leftover `secret` behavior under `envFrom`

* fix(common) wrong indentation in _cronjob.tpl (#99)

* fixed wrong indentation, cronjob + configmaps throws an error otherwise

* feat: Update code-server image tag to 4.9.1

* Allow setting `ttlSecondsAfterFinished` for CronJobs

Co-authored-by: loeken <loeken@internetz.me>
2023-01-02 16:47:38 +01:00

56 lines
1.6 KiB
Smarty

{{- /* The main container included in the controller */ -}}
{{- define "bjw-s.common.lib.controller.mainContainer" -}}
- name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}
image: {{ printf "%s:%s" .Values.image.repository (default .Chart.AppVersion .Values.image.tag) | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.command }}
command:
{{- if kindIs "string" . }}
- {{ . }}
{{- else }}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- with .Values.args }}
args:
{{- if kindIs "string" . }}
- {{ . }}
{{- else }}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.lifecycle }}
lifecycle:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.termination.messagePath }}
terminationMessagePath: {{ . }}
{{- end }}
{{- with .Values.termination.messagePolicy }}
terminationMessagePolicy: {{ . }}
{{- end }}
{{- with .Values.env }}
env:
{{- get (fromYaml (include "bjw-s.common.lib.container.envVars" $)) "env" | toYaml | nindent 4 -}}
{{- end }}
{{- with .Values.envFrom }}
envFrom:
{{- toYaml . | nindent 4 }}
{{- end }}
ports:
{{- include "bjw-s.common.lib.container.ports" . | trim | nindent 4 }}
{{- with (include "bjw-s.common.lib.container.volumeMounts" . | trim) }}
volumeMounts:
{{- nindent 4 . }}
{{- end }}
{{- include "bjw-s.common.lib.container.probes" . | trim | nindent 2 }}
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end -}}