5252 tolerations:
5353 { {- toYaml . | nindent 8 } }
5454 { {- end } }
55+ initContainers:
56+ - name: "copy-container"
57+ image: { { .image | quote } }
58+ imagePullPolicy: "IfNotPresent"
59+ command: ["/bin/sh", "-c", "cp /deployment/* /deployment_copy && cp /probes/* /probes_copy"]
60+ volumeMounts:
61+ - name: "deployment-volume"
62+ mountPath: "/deployment_copy"
63+ - name: "probes-volume"
64+ mountPath: "/probes_copy"
5565 containers:
5666 - name: "weblogic-operator"
5767 image: { { .image | quote } }
@@ -129,6 +139,7 @@ spec:
129139 runAsUser: { { .runAsUser | default 1000 } }
130140 { {- end } }
131141 runAsNonRoot: true
142+ readOnlyRootFilesystem: true
132143 privileged: false
133144 allowPrivilegeEscalation: false
134145 capabilities:
@@ -141,6 +152,12 @@ spec:
141152 - name: "weblogic-operator-secrets-volume"
142153 mountPath: "/deployment/secrets"
143154 readOnly: true
155+ - name: "deployment-volume"
156+ mountPath: "/deployment"
157+ - name: "log-volume"
158+ mountPath: "/logs"
159+ - name: "probes-volume"
160+ mountPath: "/probes"
144161 { {- if and .elkIntegrationEnabled .operatorLogPVC } }
145162 { {- fail " Error: elkIntegrationEnabled and opeatorLogPVC cannot be set at the same time." } }
146163 { {- else if .elkIntegrationEnabled } }
@@ -201,6 +218,12 @@ spec:
201218 - name: "weblogic-operator-secrets-volume"
202219 secret:
203220 secretName: "weblogic-operator-secrets"
221+ - name: "deployment-volume"
222+ emptyDir: { }
223+ - name: "log-volume"
224+ emptyDir: { }
225+ - name: "probes-volume"
226+ emptyDir: { }
204227 { {- if .elkIntegrationEnabled } }
205228 - name: "log-dir"
206229 emptyDir:
@@ -229,6 +252,7 @@ spec:
229252 persistentVolumeClaim:
230253 claimName: { { .operatorLogPVC } }
231254 { {- end } }
255+
232256{ {- end } }
233257---
234258 { { $chartVersion := .Chart.Version } }
@@ -311,6 +335,16 @@ spec:
311335 tolerations:
312336 { {- toYaml . | nindent 12 } }
313337 { {- end } }
338+ initContainers:
339+ - name: "copy-container"
340+ image: { { .image | quote } }
341+ imagePullPolicy: "IfNotPresent"
342+ command: ["/bin/sh", "-c", "cp /deployment/* /deployment_copy && cp /probes/* /probes_copy"]
343+ volumeMounts:
344+ - name: "deployment-volume"
345+ mountPath: "/deployment_copy"
346+ - name: "probes-volume"
347+ mountPath: "/probes_copy"
314348 containers:
315349 - name: "weblogic-operator-webhook"
316350 image: { { .image | quote } }
@@ -374,6 +408,7 @@ spec:
374408 runAsNonRoot: true
375409 privileged: false
376410 allowPrivilegeEscalation: false
411+ readOnlyRootFilesystem: true
377412 capabilities:
378413 drop: ["ALL"]
379414 volumeMounts:
@@ -382,6 +417,12 @@ spec:
382417 - name: "weblogic-webhook-secrets-volume"
383418 mountPath: "/deployment/secrets"
384419 readOnly: true
420+ - name: "deployment-volume"
421+ mountPath: "/deployment"
422+ - name: "log-volume"
423+ mountPath: "/logs"
424+ - name: "probes-volume"
425+ mountPath: "/probes"
385426 { {- if and .elkIntegrationEnabled .operatorLogPVC } }
386427 { {- fail " Error: elkIntegrationEnabled and opeatorLogPVC cannot be set at the same time." } }
387428 { {- else if .elkIntegrationEnabled } }
@@ -437,6 +478,12 @@ spec:
437478 - name: "weblogic-webhook-secrets-volume"
438479 secret:
439480 secretName: "weblogic-webhook-secrets"
481+ - name: "deployment-volume"
482+ emptyDir: { }
483+ - name: "log-volume"
484+ emptyDir: { }
485+ - name: "probes-volume"
486+ emptyDir: { }
440487 { {- if .elkIntegrationEnabled } }
441488 - name: "log-dir"
442489 emptyDir:
0 commit comments