diff --git a/charts/db-operator/Chart.yaml b/charts/db-operator/Chart.yaml index 4757f39..e10854a 100644 --- a/charts/db-operator/Chart.yaml +++ b/charts/db-operator/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 type: application name: db-operator -version: 1.39.0 +version: 1.40.0 # --------------------------------------------------------------------------------- # -- All supported k8s versions are in the test: # -- https://github.com/db-operator/charts/blob/main/.github/workflows/test.yaml diff --git a/charts/db-operator/templates/controller/deployment.yaml b/charts/db-operator/templates/controller/deployment.yaml index 9104019..725d138 100644 --- a/charts/db-operator/templates/controller/deployment.yaml +++ b/charts/db-operator/templates/controller/deployment.yaml @@ -26,6 +26,9 @@ spec: {{ toYaml .Values.annotations | nindent 8 }} {{- end }} spec: + {{- if semverCompare ">=1.33-0" .Capabilities.KubeVersion.Version }} + hostUsers: {{ .Values.hostUsers }} + {{- end }} {{- if .Values.serviceAccount.create }} serviceAccountName: {{ template "db-operator.serviceAccountName" . }} {{- end }} diff --git a/charts/db-operator/templates/webhook/deployment.yaml b/charts/db-operator/templates/webhook/deployment.yaml index 9083211..8b809a6 100644 --- a/charts/db-operator/templates/webhook/deployment.yaml +++ b/charts/db-operator/templates/webhook/deployment.yaml @@ -25,6 +25,9 @@ spec: {{ toYaml .Values.annotations | nindent 8 }} {{- end }} spec: + {{- if semverCompare ">=1.33-0" .Capabilities.KubeVersion.Version }} + hostUsers: {{ .Values.hostUsers }} + {{- end }} {{- if .Values.webhook.serviceAccount.create }} serviceAccountName: {{ template "webhook.serviceAccountName" . }} {{- end }} diff --git a/charts/db-operator/values.yaml b/charts/db-operator/values.yaml index d2aac98..2ff18d6 100644 --- a/charts/db-operator/values.yaml +++ b/charts/db-operator/values.yaml @@ -77,6 +77,7 @@ securityContext: drop: - ALL +hostUsers: true resources: {} nodeSelector: {} annotations: {}