updates image-mutation conditions
This commit is contained in:
101
mock-payloads/pods/pod-create-01.json
Normal file
101
mock-payloads/pods/pod-create-01.json
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
"kind": "AdmissionReview",
|
||||
"apiVersion": "admission.k8s.io/v1beta1",
|
||||
"request": {
|
||||
"uid": "60df4b0b-8856-4ce7-9fb3-bc8034856995",
|
||||
"kind": {
|
||||
"group": "",
|
||||
"version": "v1",
|
||||
"kind": "Pod"
|
||||
},
|
||||
"resource": {
|
||||
"group": "",
|
||||
"version": "v1",
|
||||
"resource": "pods"
|
||||
},
|
||||
"requestKind": {
|
||||
"group": "",
|
||||
"version": "v1",
|
||||
"kind": "Pod"
|
||||
},
|
||||
"requestResource": {
|
||||
"group": "",
|
||||
"version": "v1",
|
||||
"resource": "pods"
|
||||
},
|
||||
"name": "test-pod01",
|
||||
"namespace": "test1",
|
||||
"operation": "CREATE",
|
||||
"userInfo": {
|
||||
"username": "kubernetes-admin",
|
||||
"groups": ["system:masters", "system:authenticated"]
|
||||
},
|
||||
"object": {
|
||||
"kind": "Pod",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "test-pod01",
|
||||
"namespace": "test1",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"run": "toolbox"
|
||||
},
|
||||
"annotations": {
|
||||
"AdminNoMutate": "false"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [{
|
||||
"name": "default-token-b9kpf",
|
||||
"secret": {
|
||||
"secretName": "default-token-b9kpf"
|
||||
}
|
||||
}],
|
||||
"containers": [{
|
||||
"name": "radarr",
|
||||
"image": "linuxserver/radarr:latest",
|
||||
"ports": [{
|
||||
"containerPort": 8080,
|
||||
"protocol": "TCP"
|
||||
}],
|
||||
"resources": {},
|
||||
"volumeMounts": [{
|
||||
"name": "default-token-b9kpf",
|
||||
"readOnly": true,
|
||||
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
|
||||
}],
|
||||
"terminationMessagePath": "/dev/termination-log",
|
||||
"terminationMessagePolicy": "File",
|
||||
"imagePullPolicy": "Always"
|
||||
}],
|
||||
"restartPolicy": "Always",
|
||||
"terminationGracePeriodSeconds": 30,
|
||||
"dnsPolicy": "ClusterFirst",
|
||||
"serviceAccountName": "default",
|
||||
"serviceAccount": "default",
|
||||
"securityContext": {},
|
||||
"schedulerName": "default-scheduler",
|
||||
"tolerations": [{
|
||||
"key": "node.kubernetes.io/not-ready",
|
||||
"operator": "Exists",
|
||||
"effect": "NoExecute",
|
||||
"tolerationSeconds": 300
|
||||
}, {
|
||||
"key": "node.kubernetes.io/unreachable",
|
||||
"operator": "Exists",
|
||||
"effect": "NoExecute",
|
||||
"tolerationSeconds": 300
|
||||
}],
|
||||
"priority": 0,
|
||||
"enableServiceLinks": true
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
"oldObject": null,
|
||||
"dryRun": false,
|
||||
"options": {
|
||||
"kind": "CreateOptions",
|
||||
"apiVersion": "meta.k8s.io/v1"
|
||||
}
|
||||
}
|
||||
}
|
@ -52,8 +52,8 @@
|
||||
}
|
||||
}],
|
||||
"containers": [{
|
||||
"name": "toolbox",
|
||||
"image": "jmsearcy/toolbox:v1.0.0",
|
||||
"name": "alpine",
|
||||
"image": "alpine:3.17",
|
||||
"ports": [{
|
||||
"containerPort": 8080,
|
||||
"protocol": "TCP"
|
101
mock-payloads/pods/pod-create-03.json
Normal file
101
mock-payloads/pods/pod-create-03.json
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
"kind": "AdmissionReview",
|
||||
"apiVersion": "admission.k8s.io/v1beta1",
|
||||
"request": {
|
||||
"uid": "60df4b0b-8856-4ce7-9fb3-bc8034856995",
|
||||
"kind": {
|
||||
"group": "",
|
||||
"version": "v1",
|
||||
"kind": "Pod"
|
||||
},
|
||||
"resource": {
|
||||
"group": "",
|
||||
"version": "v1",
|
||||
"resource": "pods"
|
||||
},
|
||||
"requestKind": {
|
||||
"group": "",
|
||||
"version": "v1",
|
||||
"kind": "Pod"
|
||||
},
|
||||
"requestResource": {
|
||||
"group": "",
|
||||
"version": "v1",
|
||||
"resource": "pods"
|
||||
},
|
||||
"name": "test-pod01",
|
||||
"namespace": "test1",
|
||||
"operation": "CREATE",
|
||||
"userInfo": {
|
||||
"username": "kubernetes-admin",
|
||||
"groups": ["system:masters", "system:authenticated"]
|
||||
},
|
||||
"object": {
|
||||
"kind": "Pod",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "test-pod01",
|
||||
"namespace": "test1",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"run": "toolbox"
|
||||
},
|
||||
"annotations": {
|
||||
"AdminNoMutate": "false"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [{
|
||||
"name": "default-token-b9kpf",
|
||||
"secret": {
|
||||
"secretName": "default-token-b9kpf"
|
||||
}
|
||||
}],
|
||||
"containers": [{
|
||||
"name": "alpine",
|
||||
"image": "registry.c.test-chamber-13.lan/library/alpine:3.17",
|
||||
"ports": [{
|
||||
"containerPort": 8080,
|
||||
"protocol": "TCP"
|
||||
}],
|
||||
"resources": {},
|
||||
"volumeMounts": [{
|
||||
"name": "default-token-b9kpf",
|
||||
"readOnly": true,
|
||||
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
|
||||
}],
|
||||
"terminationMessagePath": "/dev/termination-log",
|
||||
"terminationMessagePolicy": "File",
|
||||
"imagePullPolicy": "Always"
|
||||
}],
|
||||
"restartPolicy": "Always",
|
||||
"terminationGracePeriodSeconds": 30,
|
||||
"dnsPolicy": "ClusterFirst",
|
||||
"serviceAccountName": "default",
|
||||
"serviceAccount": "default",
|
||||
"securityContext": {},
|
||||
"schedulerName": "default-scheduler",
|
||||
"tolerations": [{
|
||||
"key": "node.kubernetes.io/not-ready",
|
||||
"operator": "Exists",
|
||||
"effect": "NoExecute",
|
||||
"tolerationSeconds": 300
|
||||
}, {
|
||||
"key": "node.kubernetes.io/unreachable",
|
||||
"operator": "Exists",
|
||||
"effect": "NoExecute",
|
||||
"tolerationSeconds": 300
|
||||
}],
|
||||
"priority": 0,
|
||||
"enableServiceLinks": true
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
"oldObject": null,
|
||||
"dryRun": false,
|
||||
"options": {
|
||||
"kind": "CreateOptions",
|
||||
"apiVersion": "meta.k8s.io/v1"
|
||||
}
|
||||
}
|
||||
}
|
101
mock-payloads/pods/pod-create-04.json
Normal file
101
mock-payloads/pods/pod-create-04.json
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
"kind": "AdmissionReview",
|
||||
"apiVersion": "admission.k8s.io/v1beta1",
|
||||
"request": {
|
||||
"uid": "60df4b0b-8856-4ce7-9fb3-bc8034856995",
|
||||
"kind": {
|
||||
"group": "",
|
||||
"version": "v1",
|
||||
"kind": "Pod"
|
||||
},
|
||||
"resource": {
|
||||
"group": "",
|
||||
"version": "v1",
|
||||
"resource": "pods"
|
||||
},
|
||||
"requestKind": {
|
||||
"group": "",
|
||||
"version": "v1",
|
||||
"kind": "Pod"
|
||||
},
|
||||
"requestResource": {
|
||||
"group": "",
|
||||
"version": "v1",
|
||||
"resource": "pods"
|
||||
},
|
||||
"name": "test-pod01",
|
||||
"namespace": "test1",
|
||||
"operation": "CREATE",
|
||||
"userInfo": {
|
||||
"username": "kubernetes-admin",
|
||||
"groups": ["system:masters", "system:authenticated"]
|
||||
},
|
||||
"object": {
|
||||
"kind": "Pod",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "test-pod01",
|
||||
"namespace": "test1",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"run": "toolbox"
|
||||
},
|
||||
"annotations": {
|
||||
"AdminNoMutate": "false"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [{
|
||||
"name": "default-token-b9kpf",
|
||||
"secret": {
|
||||
"secretName": "default-token-b9kpf"
|
||||
}
|
||||
}],
|
||||
"containers": [{
|
||||
"name": "harbor-portal",
|
||||
"image": "goharbor/harbor-portal:v4.43.56",
|
||||
"ports": [{
|
||||
"containerPort": 8080,
|
||||
"protocol": "TCP"
|
||||
}],
|
||||
"resources": {},
|
||||
"volumeMounts": [{
|
||||
"name": "default-token-b9kpf",
|
||||
"readOnly": true,
|
||||
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
|
||||
}],
|
||||
"terminationMessagePath": "/dev/termination-log",
|
||||
"terminationMessagePolicy": "File",
|
||||
"imagePullPolicy": "Always"
|
||||
}],
|
||||
"restartPolicy": "Always",
|
||||
"terminationGracePeriodSeconds": 30,
|
||||
"dnsPolicy": "ClusterFirst",
|
||||
"serviceAccountName": "default",
|
||||
"serviceAccount": "default",
|
||||
"securityContext": {},
|
||||
"schedulerName": "default-scheduler",
|
||||
"tolerations": [{
|
||||
"key": "node.kubernetes.io/not-ready",
|
||||
"operator": "Exists",
|
||||
"effect": "NoExecute",
|
||||
"tolerationSeconds": 300
|
||||
}, {
|
||||
"key": "node.kubernetes.io/unreachable",
|
||||
"operator": "Exists",
|
||||
"effect": "NoExecute",
|
||||
"tolerationSeconds": 300
|
||||
}],
|
||||
"priority": 0,
|
||||
"enableServiceLinks": true
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
"oldObject": null,
|
||||
"dryRun": false,
|
||||
"options": {
|
||||
"kind": "CreateOptions",
|
||||
"apiVersion": "meta.k8s.io/v1"
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user