dfe087c0c112e9e1e14b00dd860e754d6810a69d
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
dfe087c0c1
|
refactor(persistence)!: group the values into existingPersistentVolumeClaim and new
The flat `persistence` dict mixed three concerns: whether persistence is used at all, whether the chart creates the PersistentVolumeClaim, and how that claim is shaped. The pairs `create`/`claimName` and `enabled`/`mount` were only meaningful in certain combinations, so an invalid configuration such as `create=true` together with a foreign `claimName` was silently accepted. The same split into an `existingX`/`new` pair is already used for the Secrets, so this aligns persistence with the rest of the chart. `persistence.enabled` now only decides whether a volume is used at all. `persistence.existingPersistentVolumeClaim` points at a claim managed outside of the chart, and everything under `persistence.new` describes the claim the chart creates itself. Rendering and naming move into `templates/gitea/_persistentVolumeClaims.tpl` so the Deployment and the PersistentVolumeClaim derive the claim name from a single helper instead of repeating the value lookups. Support for `global.storageClass` is dropped. It was a chart-wide override that silently applied to the Gitea claim and was evaluated through `tpl`, which made the effective storage class hard to predict. The storage class is now set explicitly via `persistence.new.storageClassName`, which also matches the field name in the PersistentVolumeClaim spec. BREAKING CHANGE: The `persistence` values were restructured and `global.storageClass` was removed. - `persistence.create` and `persistence.mount` are gone. Set `persistence.enabled` to use a volume and `persistence.existingPersistentVolumeClaim.enabled` to reuse a claim that is not managed by the chart. - `persistence.claimName` moves to `persistence.existingPersistentVolumeClaim.persistentVolumeClaimName`. A claim created by the chart is now named after `gitea.fullname` instead of the default `gitea-shared-storage`. - `persistence.accessModes`, `annotations`, `labels`, `size` and `subPath` move into `persistence.new`. - `persistence.volumeName` becomes `persistence.new.persistentVolumeName`. - `persistence.storageClass` and `global.storageClass` become `persistence.new.storageClassName`. - `persistence.enabled` now defaults to `false`. Co-authored-by: Copilot <copilot@github.com> |
||
|
|
e8f3a058ce
|
feat(deployment)!: configurable init containers and Secret checksum lookup
The chart-managed init containers were hardcoded inside `deployment.yaml`. Their image, environment, resources, security context and volume mounts could not be adjusted individually, and custom init containers could only be prepended or appended as a whole via `preExtraInitContainers`/`postExtraInitContainers`. The init containers are now rendered from `deployment.initContainers`, an ordered list whose entries either `link` a chart-managed init container (`initDirectories`, `initAppIni`, `initConfigureGPG`, `initConfigureGitea`) or provide a free-form `container` definition. This allows custom containers at any position and makes the execution order explicit. Each linked init container has its own configuration block in `values.yaml` and falls back to `deployment.gitea.securityContext` and `initContainers.resources` when unset. To support per-container images, `gitea.image` was split into the generic helper `gitea.image.name`, which renders an arbitrary `image` dict instead of only `deployment.gitea.image`. The pod annotations moved from `deployment.yaml` into the new helper `gitea.pod.annotations`. The SHA sum annotations now also cover user-provided Secrets: their content is unknown to the chart, so the Secret is read from the cluster via Helm's `lookup` function. Chart-managed Secrets keep using the rendered manifest, because the cluster still holds their pre-upgrade state during rendering. Because `lookup` requires `get` permission on Secrets and silently returns nothing during client-side rendering (`helm template`, `--dry-run`, Argo CD without a live cluster), `addSHASumAnnotation` now defaults to `false`. The trade-offs are documented in the README so users can make an informed decision. BREAKING CHANGE: `preExtraInitContainers` and `postExtraInitContainers` have been removed. Add an entry with a `container` key before or after the linked init containers in `deployment.initContainers` instead. BREAKING CHANGE: `secrets.<secret>.addSHASumAnnotation` now defaults to `false`. Set it to `true` explicitly to keep the rollout trigger on Secret changes. Co-authored-by: Copilot <copilot@github.com> |