mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
7562bea6db
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
22 lines
436 B
YAML
22 lines
436 B
YAML
---
|
|
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: require-labels
|
|
spec:
|
|
admission: true
|
|
background: true
|
|
rules:
|
|
- match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- Pod
|
|
name: check-for-labels
|
|
validate:
|
|
message: The label `app.kubernetes.io/name` is required.
|
|
pattern:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: ?*
|
|
validationFailureAction: Audit
|