From 7ebbda232d6ad1272931ca27ed9132096a5b2ae6 Mon Sep 17 00:00:00 2001 From: Damien Chomat Date: Mon, 25 Nov 2024 18:20:24 -0600 Subject: [PATCH] fix: add kyverno source repo and ns to ArgoCD --- gitops/base-install/argocd/resources.yaml | 3 --- gitops/components/kyverno/kustomization.yaml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/gitops/base-install/argocd/resources.yaml b/gitops/base-install/argocd/resources.yaml index 709ed94..fd0ff15 100644 --- a/gitops/base-install/argocd/resources.yaml +++ b/gitops/base-install/argocd/resources.yaml @@ -45,7 +45,6 @@ spec: - https://kubernetes-sigs.github.io/aws-ebs-csi-driver - https://stakater.github.io/stakater-charts - https://fluent.github.io/helm-charts - - https://kyverno.github.io/kyverno destinations: - namespace: kube-system server: https://kubernetes.default.svc @@ -63,8 +62,6 @@ spec: server: https://kubernetes.default.svc - namespace: fluent-bit server: https://kubernetes.default.svc - - namespace: kyverno - server: https://kubernetes.default.svc sourceNamespaces: - argocd clusterResourceWhitelist: diff --git a/gitops/components/kyverno/kustomization.yaml b/gitops/components/kyverno/kustomization.yaml index 3b42c63..9bbab9a 100644 --- a/gitops/components/kyverno/kustomization.yaml +++ b/gitops/components/kyverno/kustomization.yaml @@ -3,3 +3,19 @@ kind: Component resources: - ./resources.yaml + +patches: + - target: + group: argoproj.io + version: v1alpha1 + kind: AppProject + name: admins + patch: |- + - op: add + path: /spec/sourceRepos/- + value: https://kyverno.github.io/kyverno + - op: add + path: /spec/destinations/- + value: + namespace: kyverno + server: https://kubernetes.default.svc