Skip to content

Commit 37b8b9f

Browse files
committed
Use runAsUser if explicitly set
1 parent 7a4db2b commit 37b8b9f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

kubernetes/charts/weblogic-operator/templates/_operator-dep.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ spec:
117117
memory: {{ .memoryLimits }}
118118
{{- end }}
119119
securityContext:
120-
{{- if (ne ( .kubernetesPlatform | default "Generic" ) "OpenShift") }}
120+
{{- if or (hasKey . "runAsUser") (ne ( .kubernetesPlatform | default "Generic" ) "OpenShift") }}
121121
runAsUser: {{ .runAsUser | default 1000 }}
122122
{{- end }}
123123
runAsNonRoot: true
@@ -340,7 +340,7 @@ spec:
340340
memory: {{ .memoryLimits }}
341341
{{- end }}
342342
securityContext:
343-
{{- if (ne ( .kubernetesPlatform | default "Generic" ) "OpenShift") }}
343+
{{- if or (hasKey . "runAsUser") (ne ( .kubernetesPlatform | default "Generic" ) "OpenShift") }}
344344
runAsUser: {{ .runAsUser | default 1000 }}
345345
{{- end }}
346346
runAsNonRoot: true

kubernetes/charts/weblogic-operator/values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, 2023, Oracle and/or its affiliates.
1+
# Copyright (c) 2018, 2025, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
# serviceAccount specifies the name of the ServiceAccount in the operator's namespace that the
@@ -117,7 +117,7 @@ elasticSearchPort: 9200
117117
# This parameter is ignored if 'elkIntegrationEnabled' is false.
118118
elasticSearchProtocol: http
119119

120-
# createlogStashConfigMap specifies whether a ConfigMap named
120+
# createLogStashConfigMap specifies whether a ConfigMap named
121121
# weblogic-operator-logstash-cm should be created during helm install.
122122
# The ConfigMap contains the Logstash pipeline configuration for the Logstash
123123
# container running in the operator pod.
@@ -263,14 +263,14 @@ clusterSizePaddingValidationEnabled: true
263263
# tokenReviewAuthentication, if set to true, specifies whether the operator's REST API should use
264264
# 1. Kubernetes token review API for authenticating users, and
265265
# 2. Kubernetes subject access review API for authorizing a user's operation (get, list,
266-
# patch, etc) on a resource.
266+
# patch, etc.) on a resource.
267267
# 3. Update the Domain resource using the operator's privileges.
268268
# This parameter, if set to false, will use the caller's bearer token for any update
269269
# to the Domain resource so that it is done using the caller's privileges.
270270
# The default value is false.
271271
#tokenReviewAuthentication: false
272272

273-
# runAsuser specifies the UID to run the operator and conversion webhook container processes.
273+
# runAsUser specifies the UID to run the operator and conversion webhook container processes.
274274
# If not specified, it defaults to the user specified in the operator's container image.
275275
#runAsUser: 1000
276276

0 commit comments

Comments
 (0)