Files
helm-gitea/unittests/helm/tests/test-http-connection.yaml
T
volker.raschekandCopilot 6deb39df15 refactor!: move openshift.hostUsers to deployment.hostUsers
The PodSpec `hostUsers` field has nothing to do with the OpenShift compatibility profile. It only selects whether the
pod shares the host's user namespace, which is a plain Kubernetes feature. Nesting it below `openshift` implied that it
requires OpenShift and, worse, the helper only rendered it when `openshift.enabled` evaluated to `true`, so the setting
was silently ignored on vanilla Kubernetes clusters.

`gitea.hostUsers` now reads `deployment.hostUsers` and no longer depends on the OpenShift profile. The value is only
rendered when it is an actual boolean, so the field stays omitted for `null` and the platform default applies.

BREAKING CHANGE: `openshift.hostUsers` has been removed. Configure `deployment.hostUsers` instead.

Co-authored-by: Copilot <copilot@github.com>
2026-09-13 19:22:33 +02:00

35 lines
848 B
YAML

suite: test connection template
release:
name: gitea-unittests
namespace: testing
templates:
- templates/tests/test-http-connection.yaml
tests:
- it: renders openshift-compatible defaults for the test pod
set:
openshift.enabled: true
asserts:
- notExists:
path: spec.hostUsers
- equal:
path: spec.containers[0].securityContext
value:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
- it: renders an explicit hostUsers=false override for the test pod
set:
openshift:
enabled: true
deployment:
hostUsers: false
asserts:
- equal:
path: spec.hostUsers
value: false