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:
2026-10-03 19:30:50 +02:00
co-authored by Copilot
parent c96e5d4132
commit 93a576ca11
6 changed files with 43 additions and 35 deletions
+25 -17
View File
@@ -19,6 +19,7 @@
- [Gateway API](#gateway-api)
- [Session, Cache and Queue](#session-cache-and-queue)
- [Single-Pod Configurations](#single-pod-configurations)
- [Additional _app.ini_ settings](#additional-appini-settings)
- [User defined environment variables in app.ini](#user-defined-environment-variables-in-appini)
- [External Database](#external-database)
- [Ports and external url](#ports-and-external-url)
@@ -1287,20 +1288,19 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
### Persistence
| Name | Description | Value |
| --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ------------------- |
| `persistence.enabled` | Enable persistent storage. | `false` |
| `persistence.existingPersistentVolumeClaim.enabled` | Enable using an existing persistent volume claim. | `false` |
| `persistence.existingPersistentVolumeClaim.persistentVolumeClaimName` | Name of the existing persistent volume claim to use. | `""` |
| `persistence.new.annotations.helm.sh/resource-policy` | Resource policy for the new persistent volume claim. | `keep` |
| `persistence.new.labels` | Labels for the new persistent volume claim. | `{}` |
| `persistence.new.accessModes` | AccessMode for the new persistent volume claim. | `["ReadWriteOnce"]` |
| `persistence.new.persistentVolumeName` | Name of the persistent volume for the new persistent volume claim. | `""` |
| `persistence.new.size` | Size for the new persistent volume claim. | `10Gi` |
| `persistence.new.storageClassName` | Name of the storage class to use for the new persistent volume claim. | `""` |
| `persistence.new.subPath` | Subdirectory of the volume to mount at for the new persistent volume claim. | `""` |
| `extraContainers` | Additional sidecar containers to run in the pod. | `[]` |
| `extraInitVolumeMounts` | Mounts that are only mapped into the init-containers. Can be used for additional preconfiguration. | `[]` |
| Name | Description | Value |
| --------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------- |
| `persistence.enabled` | Enable persistent storage. | `false` |
| `persistence.existingPersistentVolumeClaim.enabled` | Enable using an existing persistent volume claim. | `false` |
| `persistence.existingPersistentVolumeClaim.persistentVolumeClaimName` | Name of the existing persistent volume claim to use. | `""` |
| `persistence.new.annotations.helm.sh/resource-policy` | Resource policy for the new persistent volume claim. | `keep` |
| `persistence.new.labels` | Labels for the new persistent volume claim. | `{}` |
| `persistence.new.accessModes` | AccessMode for the new persistent volume claim. | `["ReadWriteOnce"]` |
| `persistence.new.persistentVolumeName` | Name of the persistent volume for the new persistent volume claim. | `""` |
| `persistence.new.size` | Size for the new persistent volume claim. | `10Gi` |
| `persistence.new.storageClassName` | Name of the storage class to use for the new persistent volume claim. | `""` |
| `persistence.new.subPath` | Subdirectory of the volume to mount at for the new persistent volume claim. | `""` |
| `extraContainers` | Additional sidecar containers to run in the pod. | `[]` |
### Init
@@ -1466,6 +1466,7 @@ If you miss this, blindly upgrading may delete your Postgres instance and you ma
- All Secrets created by this chart are now configured through the new `secrets` section.
It exposes `annotations`, `labels`, a checksum-annotation toggle and an `existingSecret` reference for each of the
`admin`, `config`, `gpg`, `init`, `inlineConfig` and `metrics` Secrets.
- The `gitea.admin` object has been replaced by `secrets.admin`.
The chart fails to render if `gitea.admin` is still set.
Migrate as follows:
@@ -1486,6 +1487,7 @@ If you miss this, blindly upgrading may delete your Postgres instance and you ma
Admin user handling was previously skipped implicitly when neither an existing Secret nor a username and password were
set. It is now controlled explicitly via `secrets.admin.enabled`.
- The top-level `signing` object has been replaced by `secrets.gpg`.
The chart fails to render if `signing` is still set.
Migrate as follows:
@@ -1513,9 +1515,15 @@ If you miss this, blindly upgrading may delete your Postgres instance and you ma
- `extraVolumeMounts` has been removed. Deprecated since 6.0.0, it mounted the same volumes into the init containers
and into the Gitea container, and it was silently ignored as soon as `extraInitVolumeMounts` or
`deployment.gitea.volumeMounts` contained a single entry. Split the mounts explicitly: use `extraInitVolumeMounts`
for the init containers and `deployment.gitea.volumeMounts` for the Gitea container. Volumes that are needed in both
places have to be listed in both settings.
`deployment.gitea.volumeMounts` contained a single entry. Split the mounts explicitly: use
`deployment.<initContainer>.volumeMounts` for the init containers and `deployment.gitea.volumeMounts` for the Gitea
container. Volumes that are needed in both places have to be listed in both settings.
- `extraInitVolumeMounts` has been removed. It fanned a mount out to the four chart-managed init containers, but never
reached init containers added through `deployment.initContainers[].container`, despite its name. Configure the mount
on the init containers that actually need it: `deployment.initDirectories.volumeMounts`,
`deployment.initAppIni.volumeMounts`, `deployment.initConfigureGPG.volumeMounts` or
`deployment.initConfigureGitea.volumeMounts`.
</details>
-6
View File
@@ -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 -}}
-4
View File
@@ -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 }}
+6 -1
View File
@@ -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 */}}
+12 -1
View File
@@ -54,6 +54,14 @@ tests:
asserts:
- failedTemplate:
errorMessage: "`extraContainerVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.gitea.volumeMounts` instead."
- it: fails when the removed `extraInitVolumeMounts` value is set
set:
extraInitVolumeMounts:
- name: postgres-ssl-vol
mountPath: /pg-ssl
asserts:
- failedTemplate:
errorMessage: "`extraInitVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.<initContainer>.volumeMounts` instead."
- it: fails when the removed `extraVolumeMounts` value is set
set:
extraVolumeMounts:
@@ -61,7 +69,7 @@ tests:
mountPath: /pg-ssl
asserts:
- failedTemplate:
errorMessage: "`extraVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.gitea.volumeMounts` and `extraInitVolumeMounts` instead."
errorMessage: "`extraVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.gitea.volumeMounts` and `deployment.<initContainer>.volumeMounts` instead."
- it: fails when the removed `extraVolumes` value is set
set:
extraVolumes:
@@ -193,6 +201,9 @@ tests:
extraContainerVolumeMounts:
- name: postgres-ssl-vol
mountPath: /pg-ssl
extraInitVolumeMounts:
- name: postgres-ssl-vol
mountPath: /pg-ssl
extraVolumeMounts:
- name: postgres-ssl-vol
mountPath: /pg-ssl
-6
View File
@@ -924,12 +924,6 @@ extraContainers: []
# image: busybox
# command: [/bin/sh, -c, 'echo "Hello world"']
## @param extraInitVolumeMounts Mounts that are only mapped into the init-containers. Can be used for additional preconfiguration.
extraInitVolumeMounts: []
# - name: postgres-ssl-vol
# readOnly: true
# mountPath: "/pg-ssl"
## @section Init
## @param initPreScript Bash shell script copied verbatim to the start of the init-container.
initPreScript: ""