diff --git a/infra/kyverno-policies.yaml b/infra/kyverno-policies.yaml new file mode 100644 index 0000000..c91748c --- /dev/null +++ b/infra/kyverno-policies.yaml @@ -0,0 +1,34 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: kyverno + namespace: argocd + labels: + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: platform + app.kubernetes.io/managed-by: argocd + annotations: + argocd.argoproj.io/sync-wave: "1" + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + + source: + repoURL: https://github.com/snothub/sturdy-adventure.git + targetRevision: HEAD + path: cluster-resources/policies + + destination: + server: https://kubernetes.default.svc + namespace: kyverno + + syncPolicy: + automated: + prune: true + selfHeal: true + allowEmpty: false + syncOptions: + - CreateNamespace=true + - Validate=true + - ServerSideApply=true