diff --git a/argo/apps/templates/helm-apps.yaml b/argo/apps/templates/helm-apps.yaml new file mode 100644 index 0000000..251a8b7 --- /dev/null +++ b/argo/apps/templates/helm-apps.yaml @@ -0,0 +1,34 @@ +{{ range .Values.helmApps }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: {{ .app }} + namespace: argocd +spec: + project: default + destination: + server: https://kubernetes.default.svc + namespace: {{ .namespace }} + sources: + - repoURL: {{ .repoURL }} + chart: {{ .chart }} + targetRevision: {{ .revision }} + helm: + valueFiles: + - $values/argo/{{ .app }}/values.yaml + - repoURL: 'https://git.minhas.io/Asara/k8s.git' + targetRevision: master + ref: values + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + - ServerSideApply=true + revisionHistoryLimit: 2 + {{- if .ignoreDifferences }} + ignoreDifferences: {{- .ignoreDifferences | toYaml | trim | nindent 4 }} + {{- end }} +--- +{{ end }} diff --git a/argo/apps/templates/root.yaml b/argo/apps/templates/root.yaml deleted file mode 100644 index d65fa10..0000000 --- a/argo/apps/templates/root.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: root - finalizers: - - resources-finalizer.argocd.argoproj.io -spec: - destination: - server: https://kubernetes.default.svc - namespace: default - project: default - source: - path: argocd/apps/ - repoURL: https://git.minhas.io/asara/k8s - targetRevision: HEAD - syncPolicy: - automated: - prune: true - selfHeal: true -... diff --git a/argo/apps/values.yaml b/argo/apps/values.yaml index e69de29..eb5613d 100644 --- a/argo/apps/values.yaml +++ b/argo/apps/values.yaml @@ -0,0 +1,7 @@ +--- +helmApps: + - app: argocd + namespace: argocd + repoURL: https://argoproj.github.io/argo-helm + chart: argocd + revision: 5.37.1 diff --git a/argo/argocd/values.yaml b/argo/argocd/values.yaml new file mode 100644 index 0000000..9d57a86 --- /dev/null +++ b/argo/argocd/values.yaml @@ -0,0 +1,19 @@ +--- +redis-ha: + enabled: true + +controller: + replicas: 1 + +server: + replicas: 2 + +repoServer: + replicas: 2 + +applicationSet: + replicaCount: 2 + +configs: + params: + server.insecure: true diff --git a/argo/bootstrap.sh b/argo/bootstrap.sh new file mode 100755 index 0000000..4539779 --- /dev/null +++ b/argo/bootstrap.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +argocd app create apps \ + --dest-namespace argocd \ + --dest-server https://kubernetes.default.svc \ + --repo https://git.minhas.io/asara/k8s \ + --revision master \ + --self-heal \ + --sync-policy auto \ + --sync-option CreateNamespace=true \ + --sync-option ServerSideApply=true \ + --upsert \ + --path argo/apps +#argocd app sync apps