Unable to set specific SCC using Gatekeeper

Solution Verified - Updated -

Issue

Gatekeeper enforces constraints on all resources at the API server level using validating and mutating admission webhooks. This means that requests to the API to create or edit resources are checked against a set of rules and they may be rejected (validation webhooks) or automatically changed to fit the rules (mutating webhooks).

When attempting to use Gatekeeper to mutate the Security Context Constraint (SCC) field, the SCC mutation doesn't seem to work. However, this is only limited to the SCC field and mutation of other attributes still work properly.

Environment

  • OpenShift Container Platform 4.x
  • Red Hat Advanced Cluster Security for Kubernetes (Gatekeeper)
  • Red Hat Advanced Cluster Management for Kubernetes (Gatekeeper)

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