diff --git a/documentation/staging/content/managing-operators/using-helm.md b/documentation/staging/content/managing-operators/using-helm.md index 0e048416db7..a5792567bf8 100644 --- a/documentation/staging/content/managing-operators/using-helm.md +++ b/documentation/staging/content/managing-operators/using-helm.md @@ -22,6 +22,7 @@ description: "An operator runtime is installed and configured using Helm. Here a - [`labels`](#labels) - [`nodeSelector`](#nodeselector) - [`affinity`](#affinity) + - [`runAsUser`](#runasuser) - [WebLogic domain conversion webhook](#weblogic-domain-conversion-webhook) - [`webhookOnly`](#webhookonly) - [`operatorOnly`](#operatoronly) @@ -292,6 +293,13 @@ affinity: values: - another-node-label-value ``` +##### `runAsUser` +Specifies the UID to run the operator and conversion webhook container processes. If not specified, it defaults to the user specified in the operator's container image. + +Example: +```yaml +runAsUser: 1000 +``` #### WebLogic domain conversion webhook diff --git a/kubernetes/charts/weblogic-operator/templates/_operator-dep.tpl b/kubernetes/charts/weblogic-operator/templates/_operator-dep.tpl index 2a2a8423c07..35bf51071a5 100644 --- a/kubernetes/charts/weblogic-operator/templates/_operator-dep.tpl +++ b/kubernetes/charts/weblogic-operator/templates/_operator-dep.tpl @@ -34,6 +34,10 @@ spec: {{- end }} spec: serviceAccountName: {{ .serviceAccount | quote }} + {{- if .runAsUser }} + securityContext: + runAsUser: {{ .runAsUser }} + {{- end }} {{- with .nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -222,6 +226,10 @@ spec: {{- end }} spec: serviceAccountName: {{ .serviceAccount | quote }} + {{- if .runAsUser }} + securityContext: + runAsUser: {{ .runAsUser }} + {{- end }} {{- with .nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/kubernetes/charts/weblogic-operator/values.yaml b/kubernetes/charts/weblogic-operator/values.yaml index f1bb6f14b6f..c52073f1386 100644 --- a/kubernetes/charts/weblogic-operator/values.yaml +++ b/kubernetes/charts/weblogic-operator/values.yaml @@ -258,3 +258,7 @@ clusterSizePaddingValidationEnabled: true # Defaults to 5 retries and 10 seconds between each retry. # domainPresenceFailureRetryMaxCount: 5 # domainPresenceFailureRetrySeconds: 10 + +# runAsuser specifies the UID to run the operator and conversion webhook container processes. +# If not specified, it defaults to the user specified in the operator's container image. +#runAsUser: 1000