mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
* fix: verifyImages w/ multiple entries is not consistent Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * clean Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * fix: Kyverno apply produces false positives when validating 'empty dangling' tags Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> --------- Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
28 lines
817 B
YAML
28 lines
817 B
YAML
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: test-policy
|
|
annotations:
|
|
policies.kyverno.io/title: "Lol Security Standards"
|
|
policies.kyverno.io/category: "Lol Security Standards"
|
|
policies.kyverno.io/severity: "high"
|
|
policies.kyverno.io/subject: "Pod"
|
|
spec:
|
|
background: true
|
|
failurePolicy: Fail
|
|
rules:
|
|
- name: restrict-lol-annotation
|
|
match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- Pod
|
|
validate:
|
|
message: >-
|
|
If "lol" annotation is present then
|
|
its value can be only one of "such lol", "much annotation".
|
|
pattern:
|
|
# syntax refdoc: https://kyverno.io/docs/writing-policies/validate/#anchors
|
|
=(metadata):
|
|
=(annotations):
|
|
=(lol): such lol | much annotation
|