From 02e5b307b2621814b2471361a4c1cbd1ec71b9f4 Mon Sep 17 00:00:00 2001 From: James Andariese Date: Thu, 27 Apr 2023 19:11:01 -0500 Subject: [PATCH] add cluster resources --- argo1/templates/cluster-resources.yaml | 33 ++++++++++++++++++++++++++ argo1/values.yaml | 4 ++++ 2 files changed, 37 insertions(+) create mode 100644 argo1/templates/cluster-resources.yaml diff --git a/argo1/templates/cluster-resources.yaml b/argo1/templates/cluster-resources.yaml new file mode 100644 index 0000000..b7db579 --- /dev/null +++ b/argo1/templates/cluster-resources.yaml @@ -0,0 +1,33 @@ +# {{ if (index .Values "cluster-resources").enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: {{ .Release.Name }}-cluster-resources + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + path: {{ (index .Values "cluster-resources").path | default "." | quote }} + repoURL: {{ (index .Values "cluster-resources").repoURL | quote }} + targetRevision: {{ (index .Values "cluster-resources").targetRevision | default "main" | quote}} + directory: + recurse: {{ (index .Values "cluster-resources").directory.recurse | default "true" }} + include: {{ (index .Values "cluster-resources").directory.include | default "*.yaml" | quote }} + destination: + server: "https://kubernetes.default.svc" + namespace: argocd + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + retry: + limit: 10 + backoff: + duration: 5s + factor: 2 + maxDuration: 3m0s +# {{- end }} diff --git a/argo1/values.yaml b/argo1/values.yaml index 0d29df9..85f15a8 100644 --- a/argo1/values.yaml +++ b/argo1/values.yaml @@ -21,6 +21,10 @@ argo-cd: params: "server.insecure": "true" +cluster-resources: + enabled: false + repoURL: 'https://github.com/auserthatdoesntexist/arepothatalsodoesntexist' + vault-agent-injector: enabled: false values: |