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>
This commit is contained in:
@@ -101,13 +101,11 @@ false
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the pod's hostUsers setting when OpenShift compatibility is enabled.
|
||||
Return the pod's hostUsers setting. Renders nothing unless explicitly set to a boolean.
|
||||
*/}}
|
||||
{{- define "gitea.hostUsers" -}}
|
||||
{{- if eq (include "gitea.openshift.enabled" . | trim) "true" -}}
|
||||
{{- if kindIs "bool" .Values.openshift.hostUsers -}}
|
||||
{{ ternary "true" "false" .Values.openshift.hostUsers }}
|
||||
{{- end -}}
|
||||
{{- if kindIs "bool" .Values.deployment.hostUsers -}}
|
||||
{{ ternary "true" "false" .Values.deployment.hostUsers }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -75,6 +75,11 @@
|
||||
{{- fail "`nodeSelector` does no longer exist. Please refer to the changelog and configure `deployment.nodeSelector` instead." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* OPENSHIFT HOST USERS */}}
|
||||
{{- if hasKey .Values.openshift "hostUsers" -}}
|
||||
{{- fail "`openshift.hostUsers` does no longer exist. Please refer to the changelog and configure `deployment.hostUsers` instead." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* PRIORITY CLASS NAME */}}
|
||||
{{- if .Values.priorityClassName -}}
|
||||
{{- fail "`priorityClassName` does no longer exist. Please refer to the changelog and configure `deployment.priorityClassName` instead." -}}
|
||||
|
||||
Reference in New Issue
Block a user