1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-04-13 15:57:31 +00:00
kyverno/test/conformance/kuttl/cleanup/clusterpolicy/context-cleanup-pod/policy.yaml
gcp-cherry-pick-bot[bot] 52f1452ec6
Revert "chore: bump cleanup policies to v2beta1 (#8594)" (#8609) (#8610)
This reverts commit fff3ad047e.

Co-authored-by: shuting <shuting@nirmata.com>
2023-10-09 15:53:22 +00:00

28 lines
638 B
YAML

apiVersion: kyverno.io/v2alpha1
kind: ClusterCleanupPolicy
metadata:
name: cleanup-pod
spec:
context:
- name: varNamespace
apiCall:
urlPath: "/api/v1/namespaces/default"
jmesPath: metadata.name
- name: varname
variable:
value: "example"
match:
any:
- resources:
kinds:
- Pod
conditions:
all:
- key: "{{ target.metadata.name }}"
operator: Equals
value: "{{ varname }}"
- key: "{{ target.metadata.namespace }}"
operator: Equals
value: "{{ varNamespace }}"
## execute every minute
schedule: "*/1 * * * *"