Skip to content

Instantly share code, notes, and snippets.

@mrunalp
Created November 1, 2022 23:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrunalp/04ae353b1e0eb92043d72e2847579c2f to your computer and use it in GitHub Desktop.
Save mrunalp/04ae353b1e0eb92043d72e2847579c2f to your computer and use it in GitHub Desktop.
apiVersion: mutations.gatekeeper.sh/v1
kind: Assign
metadata:
name: set-spc
spec:
applyTo:
- groups: [""]
kinds: ["Pod"]
versions: ["v1"]
match:
scope: Namespaced
kinds:
- apiGroups: ["*"]
kinds: ["Pod"]
namespaces: ["acme"]
location: "spec.securityContext.seLinuxOptions.type"
parameters:
assign:
value: "spc_t"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment