This commit is contained in:
Julien Cabillot 2022-04-18 11:33:25 -04:00
parent f3d2107444
commit 88fca8dbbd
2 changed files with 44 additions and 44 deletions

View File

@ -3,7 +3,7 @@ apiVersion: v2
description: Helm chart for offlineimap description: Helm chart for offlineimap
name: offlineimap name: offlineimap
type: application type: application
version: 0.0.6 version: 0.0.7
kubeVersion: ">=1.16.0-0" kubeVersion: ">=1.16.0-0"
keywords: keywords:
- offlineimap - offlineimap

View File

@ -27,46 +27,46 @@ spec:
- name: {{ include "common.names.fullname" . }} - name: {{ include "common.names.fullname" . }}
image: {{ printf "%s:%s" .Values.image.repository (default .Chart.AppVersion .Values.image.tag) | quote }} image: {{ printf "%s:%s" .Values.image.repository (default .Chart.AppVersion .Values.image.tag) | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.env }} # {{- with .Values.env }}
env: # env:
{{- range $k, $v := . }} # {{- range $k, $v := . }}
{{- $name := $k }} # {{- $name := $k }}
{{- $value := $v }} # {{- $value := $v }}
{{- if kindIs "int" $name }} # {{- if kindIs "int" $name }}
{{- $name = required "environment variables as a list of maps require a name field" $value.name }} # {{- $name = required "environment variables as a list of maps require a name field" $value.name }}
{{- end }} # {{- end }}
- name: {{ quote $name }} # - name: {{ quote $name }}
{{- if kindIs "map" $value -}} # {{- if kindIs "map" $value -}}
{{- if hasKey $value "value" }} # {{- if hasKey $value "value" }}
{{- $value = $value.value -}} # {{- $value = $value.value -}}
{{- else if hasKey $value "valueFrom" }} # {{- else if hasKey $value "valueFrom" }}
{{- toYaml $value | nindent 6 }} # {{- toYaml $value | nindent 6 }}
{{- else }} # {{- else }}
{{- dict "valueFrom" $value | toYaml | nindent 6 }} # {{- dict "valueFrom" $value | toYaml | nindent 6 }}
{{- end }} # {{- end }}
{{- end }} # {{- end }}
{{- if not (kindIs "map" $value) }} # {{- if not (kindIs "map" $value) }}
{{- if kindIs "string" $value }} # {{- if kindIs "string" $value }}
{{- $value = tpl $value $ }} # {{- $value = tpl $value $ }}
{{- end }} # {{- end }}
value: {{ quote $value }} # value: {{ quote $value }}
{{- end }} # {{- end }}
{{- end }} # {{- end }}
{{- end }} # {{- end }}
envFrom: # envFrom:
{{- with .Values.envFrom }} # {{- with .Values.envFrom }}
{{- toYaml . | nindent 4 }} # {{- toYaml . | nindent 4 }}
{{- end }} # {{- end }}
{{- if .Values.secret }} # {{- if .Values.secret }}
- secretRef: # - secretRef:
name: {{ include "common.names.fullname" . }} # name: {{ include "common.names.fullname" . }}
{{- end }} # {{- end }}
{{- end }} # {{- end }}
{{- with (include "common.controller.volumeMounts" . | trim) }} # {{- with (include "common.controller.volumeMounts" . | trim) }}
volumeMounts: # volumeMounts:
{{- nindent 4 . }} # {{- nindent 4 . }}
{{- end }} # {{- end }}
{{- with (include "common.controller.volumes" . | trim) }} # {{- with (include "common.controller.volumes" . | trim) }}
volumes: # volumes:
{{- nindent 2 . }} # {{- nindent 2 . }}
{{- end }} # {{- end }}