mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-03 16:37:04 +02:00
Copy over kah library
This commit is contained in:
parent
c922af6065
commit
61626834fe
57 changed files with 3583 additions and 0 deletions
|
@ -0,0 +1,84 @@
|
|||
{{- /* The main container included in the controller */ -}}
|
||||
{{- define "common.controller.mainContainer" -}}
|
||||
- name: {{ include "common.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:
|
||||
{{- range $k, $v := . }}
|
||||
{{- $name := $k }}
|
||||
{{- $value := $v }}
|
||||
{{- if kindIs "int" $name }}
|
||||
{{- $name = required "environment variables as a list of maps require a name field" $value.name }}
|
||||
{{- end }}
|
||||
- name: {{ quote $name }}
|
||||
{{- if kindIs "map" $value -}}
|
||||
{{- if hasKey $value "value" }}
|
||||
{{- $value = $value.value -}}
|
||||
{{- else if hasKey $value "valueFrom" }}
|
||||
{{- toYaml $value | nindent 6 }}
|
||||
{{- else }}
|
||||
{{- dict "valueFrom" $value | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if not (kindIs "map" $value) }}
|
||||
{{- if kindIs "string" $value }}
|
||||
{{- $value = tpl $value $ }}
|
||||
{{- end }}
|
||||
value: {{ quote $value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or .Values.envFrom .Values.secret }}
|
||||
envFrom:
|
||||
{{- with .Values.envFrom }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.secret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
{{- include "common.controller.ports" . | trim | nindent 4 }}
|
||||
{{- with (include "common.controller.volumeMounts" . | trim) }}
|
||||
volumeMounts:
|
||||
{{- nindent 4 . }}
|
||||
{{- end }}
|
||||
{{- include "common.controller.probes" . | trim | nindent 2 }}
|
||||
{{- with .Values.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue