Skip to content

Commit

Permalink
docs: add assignImage mutation demo (open-policy-agent#2694)
Browse files Browse the repository at this point in the history
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
  • Loading branch information
ritazh committed Apr 28, 2023
1 parent cf2e7d5 commit 5e83d3f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
18 changes: 18 additions & 0 deletions demo/mutation/assignimagedemo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: mutations.gatekeeper.sh/v1alpha1
kind: AssignImage
metadata:
name: assign-container-image-registry
spec:
applyTo:
- groups: [ "" ]
kinds: [ "Pod" ]
versions: [ "v1" ]
location: "spec.containers[name:*].image"
parameters:
assignDomain: "mycompany.registry.io"
match:
source: "All"
scope: Namespaced
kinds:
- apiGroups: [ "*" ]
kinds: [ "Pod" ]
9 changes: 9 additions & 0 deletions demo/mutation/pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx
imagePullPolicy: IfNotPresent

0 comments on commit 5e83d3f

Please sign in to comment.