feat!: remove extraInitVolumeMounts in favour of per init container volumeMounts
Every chart-managed init container already exposes its own `volumeMounts` through the linked configuration block, so `extraInitVolumeMounts` added a second way to express the same thing. It was also the only mount setting left outside of `deployment`, which made the mount configuration harder to discover than it needed to be. Worse, the name promised more than it delivered. The value was only injected into the four linked init containers and never reached an init container added through `deployment.initContainers[].container`, even though that is exactly what a reader would expect from a setting called "extra init volume mounts". The documented use case does not need the fan-out either: the sample `initPreScript` copies the Postgres client certificate onto the `data` volume, so a single mount on `deployment.initDirectories.volumeMounts` is enough and the later containers pick it up via /data. With the value gone the `gitea.init-additional-mounts` helper has no purpose left and is removed together with its four call sites, which now rely on the already existing `volumeMounts` block of the respective init container. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -475,12 +475,6 @@ https
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gitea.init-additional-mounts" -}}
|
||||
{{- if gt (len .Values.extraInitVolumeMounts) 0 -}}
|
||||
{{- toYaml .Values.extraInitVolumeMounts -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gitea.container-additional-mounts" -}}
|
||||
{{- if gt (len .Values.deployment.gitea.volumeMounts) 0 -}}
|
||||
{{- toYaml .Values.deployment.gitea.volumeMounts -}}
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
{{- if .Values.persistence.new.subPath }}
|
||||
subPath: {{ .Values.persistence.new.subPath }}
|
||||
{{- end }}
|
||||
{{- include "gitea.init-additional-mounts" . | nindent 4 }}
|
||||
{{- with $config.volumeMounts }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -114,7 +113,6 @@
|
||||
- name: additional-config-sources-{{ $idx }}
|
||||
mountPath: "/env-to-ini-mounts/additionals/{{ $idx }}/"
|
||||
{{- end }}
|
||||
{{- include "gitea.init-additional-mounts" . | nindent 4 }}
|
||||
{{- with $config.volumeMounts }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -174,7 +172,6 @@
|
||||
- name: gpg-private-key
|
||||
mountPath: /raw
|
||||
readOnly: true
|
||||
{{- include "gitea.init-additional-mounts" . | nindent 4 }}
|
||||
{{- with $config.volumeMounts }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -293,7 +290,6 @@
|
||||
{{- if .Values.persistence.new.subPath }}
|
||||
subPath: {{ .Values.persistence.new.subPath }}
|
||||
{{- end }}
|
||||
{{- include "gitea.init-additional-mounts" . | nindent 4 }}
|
||||
{{- with $config.volumeMounts }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -65,9 +65,14 @@
|
||||
{{- fail "`extraContainerVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.gitea.volumeMounts` instead." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* EXTRA INIT VOLUME MOUNTS */}}
|
||||
{{- if .Values.extraInitVolumeMounts -}}
|
||||
{{- fail "`extraInitVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.<initContainer>.volumeMounts` instead." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* EXTRA VOLUME MOUNTS */}}
|
||||
{{- if .Values.extraVolumeMounts -}}
|
||||
{{- fail "`extraVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.gitea.volumeMounts` and `extraInitVolumeMounts` instead." -}}
|
||||
{{- fail "`extraVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.gitea.volumeMounts` and `deployment.<initContainer>.volumeMounts` instead." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* EXTRA VOLUMES */}}
|
||||
|
||||
Reference in New Issue
Block a user