Would violate Podsecurity Warning deploying eventrouter in RHOCP 4.11

Solution Verified - Updated -

Issue

  • Deploying eventrouter following the documented steps a warning security message appears as below

    $  oc process -f eventrouter.yaml | oc apply -n openshift-logging -f -
    ...
    Warning: would violate PodSecurity "restricted:latest": runAsNonRoot != true (pod or container "kube-eventrouter" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "kube-eventrouter" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
    deployment.apps/eventrouter created
    

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4.11+
  • Red Hat OpenShift Logging (RHOL)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content