mirror of
https://gitlab.kube.huskypup.net/Scooby/Homelabv4.git
synced 2026-08-21 11:36:50 +00:00
Add explicit CRD/API defaults to manifests that were causing ArgoCD's SSA dry-run to produce results different from live state: - HTTPRoutes: add group, kind, weight defaults to parentRefs/backendRefs - Kyverno ClusterPolicies: add skipBackgroundRequests, allowExistingViolations - Tetragon TracingPolicies: add return, maxData, resolve, returnCopy defaults - Gateway certificateRefs: add group="" default - Guacamole Gateway: add group="" to certificateRefs Add ignoreDifferences for resources that legitimately differ: - Cilium cert Secrets (auto-generated, data always differs) - Istio ValidatingWebhookConfiguration failurePolicy (istiod mutates) - Crowdsec LAPI Secrets (randomly generated) - ServiceMonitor/PodMonitor relabeling action defaults - StatefulSet volumeClaimTemplates apiVersion/kind defaults Persist argocd-cm ignoreDifferences config in ArgoCD Helm values. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: require-app-label
|
|
annotations:
|
|
policies.kyverno.io/title: Require App Label
|
|
policies.kyverno.io/category: Zero Trust
|
|
policies.kyverno.io/severity: low
|
|
spec:
|
|
validationFailureAction: Audit
|
|
background: true
|
|
rules:
|
|
- name: require-app-label
|
|
skipBackgroundRequests: true
|
|
match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- Deployment
|
|
- StatefulSet
|
|
- DaemonSet
|
|
exclude:
|
|
any:
|
|
- resources:
|
|
namespaces:
|
|
- kube-system
|
|
- kube-node-lease
|
|
- kyverno
|
|
- rook-ceph
|
|
- default
|
|
- crowdsec
|
|
- gitlab
|
|
- scylla-manager
|
|
- scylla-operator
|
|
- cert-manager
|
|
validate:
|
|
allowExistingViolations: true
|
|
message: "The label 'app' or 'app.kubernetes.io/name' is required."
|
|
anyPattern:
|
|
- metadata:
|
|
labels:
|
|
app: "?*"
|
|
- metadata:
|
|
labels:
|
|
app.kubernetes.io/name: "?*"
|