Deployment/DaemonSet: Fix & align extraModules
templating.
This commit is contained in:
parent
c5f348ea2e
commit
60c66489b9
3 changed files with 8 additions and 11 deletions
|
@ -198,7 +198,6 @@ IngressClass parameters.
|
||||||
Extra modules.
|
Extra modules.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "extraModules" -}}
|
{{- define "extraModules" -}}
|
||||||
|
|
||||||
- name: {{ .name }}
|
- name: {{ .name }}
|
||||||
image: {{ .image }}
|
image: {{ .image }}
|
||||||
{{- if .distroless | default false }}
|
{{- if .distroless | default false }}
|
||||||
|
@ -212,5 +211,4 @@ Extra modules.
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: {{ toYaml "modules"}}
|
- name: {{ toYaml "modules"}}
|
||||||
mountPath: {{ toYaml "/modules_mount"}}
|
mountPath: {{ toYaml "/modules_mount"}}
|
||||||
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -180,13 +180,13 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.controller.extraModules }}
|
{{- if .Values.controller.extraModules }}
|
||||||
{{- range .Values.controller.extraModules }}
|
{{- range .Values.controller.extraModules }}
|
||||||
{{ $containerSecurityContext := .containerSecurityContext | default $.Values.controller.containerSecurityContext }}
|
{{- $containerSecurityContext := .containerSecurityContext | default $.Values.controller.containerSecurityContext }}
|
||||||
{{ include "extraModules" (dict "name" .name "image" .image "containerSecurityContext" $containerSecurityContext) | indent 8 }}
|
{{- include "extraModules" (dict "name" .name "image" .image "containerSecurityContext" $containerSecurityContext "distroless" false) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.controller.opentelemetry.enabled}}
|
{{- if .Values.controller.opentelemetry.enabled}}
|
||||||
{{ $otelContainerSecurityContext := $.Values.controller.opentelemetry.containerSecurityContext | default $.Values.controller.containerSecurityContext }}
|
{{- $otelContainerSecurityContext := $.Values.controller.opentelemetry.containerSecurityContext | default $.Values.controller.containerSecurityContext }}
|
||||||
{{- include "extraModules" (dict "name" "opentelemetry" "image" .Values.controller.opentelemetry.image "containerSecurityContext" $otelContainerSecurityContext) | nindent 8}}
|
{{- include "extraModules" (dict "name" "opentelemetry" "image" .Values.controller.opentelemetry.image "containerSecurityContext" $otelContainerSecurityContext "distroless" false) | nindent 8}}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.controller.hostNetwork }}
|
{{- if .Values.controller.hostNetwork }}
|
||||||
|
|
|
@ -24,8 +24,7 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
|
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
|
||||||
{{- if .Values.controller.updateStrategy }}
|
{{- if .Values.controller.updateStrategy }}
|
||||||
strategy:
|
strategy: {{ toYaml .Values.controller.updateStrategy | nindent 4 }}
|
||||||
{{ toYaml .Values.controller.updateStrategy | nindent 4 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
minReadySeconds: {{ .Values.controller.minReadySeconds }}
|
minReadySeconds: {{ .Values.controller.minReadySeconds }}
|
||||||
template:
|
template:
|
||||||
|
@ -184,12 +183,12 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.controller.extraModules }}
|
{{- if .Values.controller.extraModules }}
|
||||||
{{- range .Values.controller.extraModules }}
|
{{- range .Values.controller.extraModules }}
|
||||||
{{ $containerSecurityContext := .containerSecurityContext | default $.Values.controller.containerSecurityContext }}
|
{{- $containerSecurityContext := .containerSecurityContext | default $.Values.controller.containerSecurityContext }}
|
||||||
{{ include "extraModules" (dict "name" .name "image" .image "containerSecurityContext" $containerSecurityContext) | indent 8 }}
|
{{- include "extraModules" (dict "name" .name "image" .image "containerSecurityContext" $containerSecurityContext "distroless" false) | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.controller.opentelemetry.enabled}}
|
{{- if .Values.controller.opentelemetry.enabled}}
|
||||||
{{ $otelContainerSecurityContext := $.Values.controller.opentelemetry.containerSecurityContext | default $.Values.controller.containerSecurityContext }}
|
{{- $otelContainerSecurityContext := $.Values.controller.opentelemetry.containerSecurityContext | default $.Values.controller.containerSecurityContext }}
|
||||||
{{- include "extraModules" (dict "name" "opentelemetry" "image" .Values.controller.opentelemetry.image "containerSecurityContext" $otelContainerSecurityContext "distroless" false) | nindent 8}}
|
{{- include "extraModules" (dict "name" "opentelemetry" "image" .Values.controller.opentelemetry.image "containerSecurityContext" $otelContainerSecurityContext "distroless" false) | nindent 8}}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue