1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-12 19:06:55 +00:00
kyverno/cmd/cli/kubectl-kyverno/_testdata/policies/namespace-policy.yaml
gcp-cherry-pick-bot[bot] aa8adbbd54
fix: policy report generation for namespaced policies in CLI (#10923) (#11075)
* fix policy report generation for namespaced policies



* fix



---------

Signed-off-by: asr2003 <162500856+asr2003@users.noreply.github.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: asr2003 <162500856+asr2003@users.noreply.github.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-10 16:44:12 +00:00

18 lines
361 B
YAML

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: require-namespace-labels
namespace: test
spec:
rules:
- name: check-for-label
match:
resources:
kinds:
- Namespace
validate:
message: "Namespaces must have the label `purpose`."
pattern:
metadata:
labels:
purpose: "?*"