diff --git a/documentation/3.4/content/userguide/managing-operators/using-helm.md b/documentation/3.4/content/userguide/managing-operators/using-helm.md index 6d853d60bde..fa63c3257d8 100644 --- a/documentation/3.4/content/userguide/managing-operators/using-helm.md +++ b/documentation/3.4/content/userguide/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 management](#weblogic-domain-management) - [`domainNamespaceSelectionStrategy`](#domainnamespaceselectionstrategy) - [`domainNamespaces`](#domainnamespaces) @@ -288,6 +289,14 @@ affinity: - another-node-label-value ``` +##### `runAsUser` +Specifies the UID to run the operator container process. If not specified, it defaults to the user specified in the operator's container image. + +Example: +```yaml +runAsUser: 1000 +``` + #### WebLogic domain management The settings in this section determine the namespaces that an operator diff --git a/kubernetes/charts/weblogic-operator/templates/_operator-dep.tpl b/kubernetes/charts/weblogic-operator/templates/_operator-dep.tpl index 8a5794d306b..6faacc095c8 100644 --- a/kubernetes/charts/weblogic-operator/templates/_operator-dep.tpl +++ b/kubernetes/charts/weblogic-operator/templates/_operator-dep.tpl @@ -33,6 +33,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 ff9063f1545..5068017f4be 100644 --- a/kubernetes/charts/weblogic-operator/values.yaml +++ b/kubernetes/charts/weblogic-operator/values.yaml @@ -228,3 +228,8 @@ clusterSizePaddingValidationEnabled: true # Defaults to 5 retries and 10 seconds between each retry. # domainPresenceFailureRetryMaxCount: 5 # domainPresenceFailureRetrySeconds: 10 + +# runAsUser specifies the UID to run the operator container process. If not specified, +# it defaults to the user specified in the operator's container image. +#runAsUser: 1000 +