This commit is contained in:
samsep101
2026-01-05 14:24:13 +05:00
commit 92a1846189
5 changed files with 69 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: auto-label-static
annotations:
policies.kyverno.io/title: Auto-label static applications
policies.kyverno.io/category: Best Practices
spec:
rules:
- name: add-security-labels
match:
resources:
kinds:
- Pod
selector:
matchLabels:
app.kubernetes.io/part-of: "static-site"
mutate:
patchStrategicMerge:
metadata:
labels:
security.kyverno.io/nonsecure: "true"
app-type: "static"