refactor!: remove the deprecated securityContext value
changelog / changelog (push) Successful in 34s
check-and-test / check-and-test (push) Successful in 4m30s

`securityContext` was deprecated when the chart split it into a pod-level and a container-level value. It
only ever acted as a fallback for the runtime container: when the container-level value was empty, the
deprecated map was used instead. That fallback silently changed behaviour depending on whether an unrelated
value happened to be set, and it kept a third security-related values path alive next to
`deployment.securityContext` and `deployment.gitea.securityContext`.

With the fallback gone, `gitea.runtimeContainerSecurityContext` was identical to
`gitea.containerSecurityContext`, so the helper was dropped and the Gitea container now reuses the shared
one. A deprecation check fails the render when the removed value is still set, because silently ignoring it
would drop `runAsUser`, `runAsNonRoot` or the capability set and let the container run with weaker
restrictions than intended.

BREAKING CHANGE: `securityContext` no longer exists. Use `deployment.securityContext` for the pod-level and
`deployment.gitea.securityContext` for the container-level security context. Installations that still set
`securityContext` will fail to render unless `checkDeprecation` is set to `false`.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-09-04 13:41:58 +02:00
co-authored by Copilot
parent 377306b418
commit 00ccfc6734
6 changed files with 16 additions and 17 deletions
@@ -86,6 +86,13 @@ tests:
asserts:
- failedTemplate:
errorMessage: "`schedulerName` does no longer exist. Please refer to the changelog and configure `deployment.schedulerName` instead."
- it: fails when the removed `securityContext` value is set
set:
securityContext:
runAsUser: 1000
asserts:
- failedTemplate:
errorMessage: "`securityContext` does no longer exist. Please refer to the changelog and configure `deployment.securityContext` and `deployment.gitea.securityContext` instead."
- it: fails when the removed `strategy` value is set
set:
strategy:
@@ -133,6 +140,8 @@ tests:
limits:
cpu: 100m
schedulerName: stork
securityContext:
runAsUser: 1000
strategy:
type: Recreate
tolerations: