Skip to content

Operator Does Not Apply Pod-Level Security Context to Introspector Pod #5070

Closed
@srbhklkrn

Description

@srbhklkrn

Summary
When deploying a WebLogic domain using the Oracle WebLogic Kubernetes Operator, the pod-level security context specified in the Domain resource is not being applied to the introspector pod. As a result, the introspector pod fails to meet the security requirements enforced by the namespace's Pod Security Standards. Notably, the container-level security context is applied correctly to the introspector pod.

Environment
Oracle WebLogic Kubernetes Image: 12.2.1.4-jdk8-ol8-240712
Oracle WebLogic Operator image: 4.2.7
Kubernetes Version: v1.30.3
Namespace Pod Security Level: restricted

Problem Description
The operator fails to apply the pod-level security context settings specified under serverPod.podSecurityContext in the Domain resource to the introspector pod. This omission causes the introspector pod creation to fail when the namespace enforces the restricted Pod Security Standards, as the required pod-level security settings are not present.

Error Message
Error creating: pods "accessdomain-introspector-8hnv2" is forbidden: violates PodSecurity "restricted:latest": seccompProfile (pod or container "accessdomain-introspector" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")

Domain YAML

apiVersion: "weblogic.oracle/v9"
kind: Domain
metadata:
  name: accessdomain
spec:
  domainUID: accessdomain
  ...
  serverPod:
    podSecurityContext:
      seccompProfile:
        type: RuntimeDefault
    containerSecurityContext:
      runAsUser: 1000
      runAsNonRoot: true
      allowPrivilegeEscalation: false
      capabilities:
        drop:
          - ALL

Expected Behavior

The operator should apply the specified serverPod.podSecurityContext settings to all pods it creates, including the introspector pod.
The introspector pod should be created successfully, complying with the restricted Pod Security Standards enforced in the namespace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions