feat(deployment)!: move extraVolumes and extraContainerVolumeMounts into the deployment dict
Both values are Deployment-scoped: `extraVolumes` is rendered into `spec.template.spec.volumes` and `extraContainerVolumeMounts` only into the volumeMounts of the Gitea container. The `extra*` prefix said nothing about that scope and left them sitting at the top level, far away from the pod- and container-scoped settings that already live under `deployment` and `deployment.gitea`. They therefore become `deployment.volumes` and `deployment.gitea.volumeMounts`, which makes the target resource and container obvious from the values path alone and continues the consolidation started with `deployment.gitea.env`, `deployment.gitea.image`, `deployment.gitea.resources` and the security contexts. `extraInitVolumeMounts` stays where it is for now, because it targets the init containers rather than the Gitea container. The deprecated `extraVolumeMounts` fallback is kept intact and now points at `deployment.gitea.volumeMounts` in its documentation. Both removed keys are covered by the deprecation check, because silently ignoring them would drop mounted TLS certificates, custom themes or client certs and leave Gitea running with a broken or unexpected configuration. BREAKING CHANGE: `extraVolumes` and `extraContainerVolumeMounts` no longer exist. Use `deployment.volumes` and `deployment.gitea.volumeMounts` instead. Installations that still set the old keys will fail to render unless `checkDeprecation` is set to `false`. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -489,8 +489,8 @@ https
|
||||
|
||||
{{- define "gitea.container-additional-mounts" -}}
|
||||
{{- /* Honor the deprecated extraVolumeMounts variable when defined */ -}}
|
||||
{{- if gt (len .Values.extraContainerVolumeMounts) 0 -}}
|
||||
{{- toYaml .Values.extraContainerVolumeMounts -}}
|
||||
{{- if gt (len .Values.deployment.gitea.volumeMounts) 0 -}}
|
||||
{{- toYaml .Values.deployment.gitea.volumeMounts -}}
|
||||
{{- else if gt (len .Values.extraVolumeMounts) 0 -}}
|
||||
{{- toYaml .Values.extraVolumeMounts -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -457,8 +457,8 @@ spec:
|
||||
secret:
|
||||
secretName: {{ include "gitea.secret.config.name" . }}
|
||||
defaultMode: 110
|
||||
{{- if gt (len .Values.extraVolumes) 0 }}
|
||||
{{- toYaml .Values.extraVolumes | nindent 8 }}
|
||||
{{- if gt (len .Values.deployment.volumes) 0 }}
|
||||
{{- toYaml .Values.deployment.volumes | nindent 8 }}
|
||||
{{- end }}
|
||||
- name: inline-config-sources
|
||||
secret:
|
||||
|
||||
@@ -60,6 +60,16 @@
|
||||
{{- fail "`dnsConfig` does no longer exist. Please refer to the changelog and configure `deployment.dnsConfig` instead." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* EXTRA CONTAINER VOLUME MOUNTS */}}
|
||||
{{- if .Values.extraContainerVolumeMounts -}}
|
||||
{{- fail "`extraContainerVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.gitea.volumeMounts` instead." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* EXTRA VOLUMES */}}
|
||||
{{- if .Values.extraVolumes -}}
|
||||
{{- fail "`extraVolumes` does no longer exist. Please refer to the changelog and configure `deployment.volumes` instead." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* NODE SELECTOR */}}
|
||||
{{- if .Values.nodeSelector -}}
|
||||
{{- fail "`nodeSelector` does no longer exist. Please refer to the changelog and configure `deployment.nodeSelector` instead." -}}
|
||||
|
||||
Reference in New Issue
Block a user