mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
- Removed: **BREAKING**: Removed support for HorizontalPodAutoscaler - Added: Support services have extraSelectorLabels (#58) - Added: support for `httpGet` probes - Added: support for setting labels / annotations on volumeClaimTemplates - Changed: **BREAKING**: Restructure of template components. All Helm templates have been renamed / namespaced. E.g. `common.values.setup` has now become `bjw-s.common.loader.init`. - Changed: **BREAKING**: Raised minimum supported k8s version to 1.22 - Changed: **BREAKING**: Renamed `configmap` key to `configMaps` - Changed: **BREAKING**: Moved `serviceMonitor` from `service` to its own key - Changed: **BREAKING**: Renamed `secret` key to `secrets`, which now works similar to `configMaps` - Changed: Updated code-server image to v4.8.2 - Changed: Updated gluetun image to v3.32.0 - Fixed: Fix NOTES always showing ingress protocol as http (#62) Signed-off-by: Gavin Mogan <git@gavinmogan.com> Co-authored-by: Gavin Mogan <github@gavinmogan.com> Co-authored-by: Gabe Cook <gabe565@gmail.com>
105 lines
3.4 KiB
Smarty
105 lines
3.4 KiB
Smarty
{{- /*
|
|
The pod definition included in the controller.
|
|
*/ -}}
|
|
{{- define "bjw-s.common.lib.controller.pod" -}}
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 2 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "bjw-s.common.lib.chart.names.serviceAccountName" . }}
|
|
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }}
|
|
{{- with .Values.podSecurityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 2 }}
|
|
{{- end }}
|
|
{{- with .Values.priorityClassName }}
|
|
priorityClassName: {{ . }}
|
|
{{- end }}
|
|
{{- with .Values.runtimeClassName }}
|
|
runtimeClassName: {{ . }}
|
|
{{- end }}
|
|
{{- with .Values.schedulerName }}
|
|
schedulerName: {{ . }}
|
|
{{- end }}
|
|
{{- with .Values.hostNetwork }}
|
|
hostNetwork: {{ . }}
|
|
{{- end }}
|
|
{{- with .Values.hostname }}
|
|
hostname: {{ . }}
|
|
{{- end }}
|
|
{{- if .Values.dnsPolicy }}
|
|
dnsPolicy: {{ .Values.dnsPolicy }}
|
|
{{- else if .Values.hostNetwork }}
|
|
dnsPolicy: ClusterFirstWithHostNet
|
|
{{- else }}
|
|
dnsPolicy: ClusterFirst
|
|
{{- end }}
|
|
{{- with .Values.dnsConfig }}
|
|
dnsConfig:
|
|
{{- toYaml . | nindent 2 }}
|
|
{{- end }}
|
|
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
|
{{- with .Values.termination.gracePeriodSeconds }}
|
|
terminationGracePeriodSeconds: {{ . }}
|
|
{{- end }}
|
|
{{- if .Values.initContainers }}
|
|
initContainers:
|
|
{{- $initContainers := list }}
|
|
{{- range $index, $key := (keys .Values.initContainers | uniq | sortAlpha) }}
|
|
{{- $container := get $.Values.initContainers $key }}
|
|
{{- if not $container.name -}}
|
|
{{- $_ := set $container "name" $key }}
|
|
{{- end }}
|
|
{{- if $container.env -}}
|
|
{{- $_ := set $ "ObjectValues" (dict "envVars" $container.env) -}}
|
|
{{- $newEnv := fromYaml (include "bjw-s.common.lib.container.envVars" $) -}}
|
|
{{- $_ := unset $.ObjectValues "envVars" -}}
|
|
{{- $_ := set $container "env" $newEnv.env }}
|
|
{{- end }}
|
|
{{- $initContainers = append $initContainers $container }}
|
|
{{- end }}
|
|
{{- tpl (toYaml $initContainers) $ | nindent 2 }}
|
|
{{- end }}
|
|
containers:
|
|
{{- include "bjw-s.common.lib.controller.mainContainer" . | nindent 2 }}
|
|
{{- with .Values.additionalContainers }}
|
|
{{- $additionalContainers := list }}
|
|
{{- range $name, $container := . }}
|
|
{{- if not $container.name -}}
|
|
{{- $_ := set $container "name" $name }}
|
|
{{- end }}
|
|
{{- if $container.env -}}
|
|
{{- $_ := set $ "ObjectValues" (dict "envVars" $container.env) -}}
|
|
{{- $newEnv := fromYaml (include "bjw-s.common.lib.container.envVars" $) -}}
|
|
{{- $_ := set $container "env" $newEnv.env }}
|
|
{{- $_ := unset $.ObjectValues "envVars" -}}
|
|
{{- end }}
|
|
{{- $additionalContainers = append $additionalContainers $container }}
|
|
{{- end }}
|
|
{{- tpl (toYaml $additionalContainers) $ | nindent 2 }}
|
|
{{- end }}
|
|
{{- with (include "bjw-s.common.lib.controller.volumes" . | trim) }}
|
|
volumes:
|
|
{{- nindent 2 . }}
|
|
{{- end }}
|
|
{{- with .Values.hostAliases }}
|
|
hostAliases:
|
|
{{- toYaml . | nindent 2 }}
|
|
{{- end }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 2 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 2 }}
|
|
{{- end }}
|
|
{{- with .Values.topologySpreadConstraints }}
|
|
topologySpreadConstraints:
|
|
{{- toYaml . | nindent 2 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 2 }}
|
|
{{- end }}
|
|
{{- end -}}
|