Test argo with argo

This commit is contained in:
Amarpreet Minhas 2023-07-08 13:51:02 -04:00
parent 81212e1b7f
commit 2089143fbb
5 changed files with 73 additions and 21 deletions

View file

@ -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 }}

View file

@ -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
...

View file

@ -0,0 +1,7 @@
---
helmApps:
- app: argocd
namespace: argocd
repoURL: https://argoproj.github.io/argo-helm
chart: argocd
revision: 5.37.1

19
argo/argocd/values.yaml Normal file
View file

@ -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

13
argo/bootstrap.sh Executable file
View file

@ -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