mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 09:26:54 +00:00
* fix policy report generation for namespaced policies Signed-off-by: asr2003 <162500856+asr2003@users.noreply.github.com> * fix Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> --------- 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: Jim Bugwadia <jim@nirmata.com> Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
18 lines
361 B
YAML
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: "?*"
|