From 17675f31d118bbd70cf0317193a3c6f134aeab2b Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Mon, 26 Jun 2023 10:37:28 +0200 Subject: [PATCH] fix(argocd): add baseline project and application - Add `argocd-apps` HelmChart to deploy baseline project and application - Define `baseline` project with source repos, destinations, and cluster resource whitelist - Define `baseline` application with source, destination, and sync policy ArgoCD v5.0 removes support for the parameters server.additionalApplications and server.additionalProjects. Parameters are moved to argocd-apps. See: https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd#500 --- argocd-init.yml | 83 ++++++++++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 35 deletions(-) diff --git a/argocd-init.yml b/argocd-init.yml index 86257ce..3a8f4e3 100644 --- a/argocd-init.yml +++ b/argocd-init.yml @@ -22,39 +22,52 @@ spec: enabled: false server: replicas: 0 - additionalProjects: - - name: baseline +--- +apiVersion: helm.cattle.io/v1 +kind: HelmChart +metadata: + name: argocd-apps + namespace: kube-system +spec: + repo: https://argoproj.github.io/argo-helm + chart: argocd-apps + targetNamespace: argocd + valuesContent: |- + projects: + - name: baseline + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io + sourceRepos: + - '*' + destinations: + - namespace: '*' + server: '*' + clusterResourceWhitelist: + - group: '*' + kind: '*' + applications: + - name: baseline + namespace: argocd + project: baseline + finalizers: + - resources-finalizer.argocd.argoproj.io + source: + repoURL: 'https://git.smsvc.net/k8s/baseline.git' + targetRevision: HEAD + path: k8s-manifests/ + directory: + recurse: true + destination: + server: 'https://kubernetes.default.svc' namespace: argocd - sourceRepos: - - '*' - destinations: - - namespace: '*' - server: '*' - clusterResourceWhitelist: - - group: '*' - kind: '*' - additionalApplications: - - name: baseline - namespace: argocd - project: baseline - finalizers: - - resources-finalizer.argocd.argoproj.io - source: - repoURL: 'https://git.smsvc.net/k8s/baseline.git' - targetRevision: HEAD - path: k8s-manifests/ - directory: - recurse: true - destination: - server: 'https://kubernetes.default.svc' - namespace: argocd - syncPolicy: - automated: - prune: true - selfHeal: true - retry: - limit: 5 - backoff: - duration: 5s - factor: 2 - maxDuration: 5m + syncPolicy: + automated: + prune: true + selfHeal: true + retry: + limit: 5 + backoff: + duration: 5s + factor: 2 + maxDuration: 5m