Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ER - Enable using securityContext.readOnlyRootFilesystem set to true with for Weblogic domain PODs controlled by Weblogic Kubernetes Operator #5344

Open
Michalski-Piotr opened this issue Apr 2, 2025 · 1 comment

Comments

@Michalski-Piotr
Copy link

Hello,
there is followowing security related recommendation raised by one of customer using Weblogic Domain running in Kubernetes architecture and controlled by Oracle Weblogic Operator:

(HIGH): Container 'weblogic-server' of Pod 'osb-domain-adminserver' should set 'securityContext.readOnlyRootFilesystem' to true
 (HIGH): Container 'weblogic-server' of Pod 'osb-domain-osb-server1' should set 'securityContext.readOnlyRootFilesystem' to true
 (HIGH): Container 'weblogic-server' of Pod 'osb-domain-osb-server2' should set 'securityContext.readOnlyRootFilesystem' to true

It was attempted to add readOnlyRootFilesystem: true to the domain.yaml for Weblogic domain controlled by the WKO Operator:

        securityContext:
          readOnlyRootFilesystem: true

But after this operation WKO introspector POD is failing and is not able to introspect such domain:

After adding ‘securityContext.readOnlyRootFilesystem ‘ to OSB doman POD specification, the Weblogic Operator introspector job pod is failing:

kubectl get pods -n osb osb-domain-introspector-ldmct
NAME                            READY   STATUS   RESTARTS   AGE
osb-domain-introspector-ldmct   0/1     Error    0          98s

In the introspector pod log there is following error:

/weblogic-operator/scripts/utils.sh: line 446: cannot create temp file for here-document: Read-only file system
/weblogic-operator/scripts/utils.sh: line 447: cannot create temp file for here-document: Read-only file system

It seems WKO operator require to create temp file on the POD root filesystem.

Is there any option to use securityContext.readOnlyRootFilesystem set to true with Weblogic Operator and Weblogic Server domains running in Kubernetes architecture and controlled by the Operator, please?

If not we would like to raise for one of Oracle customers that use Weblogic Operator running in Oracle OCI Kubernetes OKE.

Topic was discussed internally with Oracle Weblogic Kubernetes Operator Product Management Team and we have agreed to raise the Enhancement Request in GitHub.

Kind regards,
Piotr Michalski
Oracle CSS

@Michalski-Piotr
Copy link
Author

Customer is using currently Weblogic Kubernetes Operator 4.2.9 and below versions:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant