feat!: remove the deprecated extraVolumeMounts value
`extraVolumeMounts` was deprecated in 6.0.0 in favour of separate mounts for the init phase and the runtime container, but it was never removed. It had turned into a trap: both helpers treated it as a fallback that silently disappeared as soon as `extraInitVolumeMounts` respectively `deployment.gitea.volumeMounts` contained a single entry, so adding one new mount could unmount everything configured through the old value. The documented successor `extraContainerVolumeMounts` had meanwhile been removed itself, which left the deprecation note pointing at a value that already fails the deprecation check. Removing it makes the mount configuration explicit: `extraInitVolumeMounts` for the init containers, `deployment.gitea.volumeMounts` for the Gitea container, and both when a volume is needed in both places. The GPG init container used `extraVolumeMounts` directly instead of the shared helper and therefore ignored `extraInitVolumeMounts`, unlike the three other init containers. It now uses `gitea.init-additional-mounts` as well. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -476,20 +476,14 @@ https
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gitea.init-additional-mounts" -}}
|
||||
{{- /* Honor the deprecated extraVolumeMounts variable when defined */ -}}
|
||||
{{- if gt (len .Values.extraInitVolumeMounts) 0 -}}
|
||||
{{- toYaml .Values.extraInitVolumeMounts -}}
|
||||
{{- else if gt (len .Values.extraVolumeMounts) 0 -}}
|
||||
{{- toYaml .Values.extraVolumeMounts -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gitea.container-additional-mounts" -}}
|
||||
{{- /* Honor the deprecated extraVolumeMounts variable when defined */ -}}
|
||||
{{- if gt (len .Values.deployment.gitea.volumeMounts) 0 -}}
|
||||
{{- toYaml .Values.deployment.gitea.volumeMounts -}}
|
||||
{{- else if gt (len .Values.extraVolumeMounts) 0 -}}
|
||||
{{- toYaml .Values.extraVolumeMounts -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -174,9 +174,7 @@
|
||||
- name: gpg-private-key
|
||||
mountPath: /raw
|
||||
readOnly: true
|
||||
{{- if .Values.extraVolumeMounts }}
|
||||
{{- toYaml .Values.extraVolumeMounts | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- include "gitea.init-additional-mounts" . | nindent 4 }}
|
||||
{{- with $config.volumeMounts }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -65,6 +65,11 @@
|
||||
{{- fail "`extraContainerVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.gitea.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." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* EXTRA VOLUMES */}}
|
||||
{{- if .Values.extraVolumes -}}
|
||||
{{- fail "`extraVolumes` does no longer exist. Please refer to the changelog and configure `deployment.volumes` instead." -}}
|
||||
|
||||
Reference in New Issue
Block a user