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

fix: use newer seccompProfile spec in mutation #599

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions mutation/pod-security-policy/seccomp/samples/mutation.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
apiVersion: mutations.gatekeeper.sh/v1
kind: AssignMetadata
kind: Assign
metadata:
name: k8spspseccomp
spec:
match:
scope: Namespaced
kinds:
- apiGroups: [""]
kinds: ["Pod"]
location: metadata.annotations."seccomp.security.alpha.kubernetes.io/pod"
applyTo:
- groups: [""]
kinds: ["Pod"]
versions: ["v1"]
location: spec.securityContext.seccompProfile
parameters:
pathTests:
- subPath: spec.securityContext.seccompProfile
condition: MustNotExist
assign:
value: runtime/default
value:
type: RuntimeDefault
19 changes: 11 additions & 8 deletions website/docs/mutation-examples/seccomp.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@ kubectl apply -f https://raw.githubusercontent.com/open-policy-agent/gatekeeper-
## Mutation Examples
```yaml
apiVersion: mutations.gatekeeper.sh/v1
kind: AssignMetadata
kind: Assign
metadata:
name: k8spspseccomp
spec:
match:
scope: Namespaced
kinds:
- apiGroups: [""]
kinds: ["Pod"]
location: metadata.annotations."seccomp.security.alpha.kubernetes.io/pod"
applyTo:
- groups: [""]
kinds: ["Pod"]
versions: ["v1"]
location: spec.securityContext.seccompProfile
parameters:
pathTests:
- subPath: spec.securityContext.seccompProfile
condition: MustNotExist
assign:
value: runtime/default
value:
type: RuntimeDefault

```
Loading