diff --git a/README.md b/README.md index 0c0cd0e..b772d5e 100644 --- a/README.md +++ b/README.md @@ -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..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`. diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index 28dd21a..ab483ba 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -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 -}} diff --git a/templates/_initContainers.tpl b/templates/_initContainers.tpl index a24e366..143971a 100644 --- a/templates/_initContainers.tpl +++ b/templates/_initContainers.tpl @@ -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 }} diff --git a/templates/deprecation.yaml b/templates/deprecation.yaml index 83ce70d..8c87b78 100644 --- a/templates/deprecation.yaml +++ b/templates/deprecation.yaml @@ -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..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..volumeMounts` instead." -}} {{- end -}} {{/* EXTRA VOLUMES */}} diff --git a/unittests/helm/deployment/deprecations.yaml b/unittests/helm/deployment/deprecations.yaml index 635db56..cabc14a 100644 --- a/unittests/helm/deployment/deprecations.yaml +++ b/unittests/helm/deployment/deprecations.yaml @@ -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..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..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 diff --git a/values.yaml b/values.yaml index 528b7a9..b48f49a 100644 --- a/values.yaml +++ b/values.yaml @@ -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: ""