sync all apps

Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
This commit is contained in:
Alexandre Gaudreault 2024-03-11 11:27:57 -04:00
parent 53e28ff20c
commit cd037ff1cd
No known key found for this signature in database
GPG Key ID: 9444460736DE847A
8 changed files with 61 additions and 98 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/**/charts/

View File

@ -0,0 +1,29 @@
{{- range .Values.applications }}
{{- $config := $.Values.config -}}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: {{ printf "example.%s" .name | quote }}
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: {{ .namespace | default .name | quote }}
server: {{ $config.spec.destination.server | quote }}
project: default
source:
path: {{ .path | default .name | quote }}
repoURL: {{ $config.spec.source.repoURL }}
targetRevision: {{ $config.spec.source.targetRevision }}
{{- with .tool }}
{{- . | toYaml | nindent 4 }}
{{- end }}
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
prune: true
selfHeal: true
---
{{ end -}}

View File

@ -1,16 +0,0 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: helm-guestbook
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: helm-guestbook
server: {{ .Values.spec.destination.server }}
project: default
source:
path: helm-guestbook
repoURL: {{ .Values.spec.source.repoURL }}
targetRevision: {{ .Values.spec.source.targetRevision }}

View File

@ -1,17 +0,0 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: helm-hooks
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: helm-hooks
server: {{ .Values.spec.destination.server }}
project: default
source:
path: helm-hooks
repoURL: {{ .Values.spec.source.repoURL }}
targetRevision: {{ .Values.spec.source.targetRevision }}

View File

@ -1,16 +0,0 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: kustomize-guestbook
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: kustomize-guestbook
server: {{ .Values.spec.destination.server }}
project: default
source:
path: kustomize-guestbook
repoURL: {{ .Values.spec.source.repoURL }}
targetRevision: {{ .Values.spec.source.targetRevision }}

View File

@ -1,27 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: helm-guestbook
annotations:
argocd.argoproj.io/sync-wave: "-1"
---
apiVersion: v1
kind: Namespace
metadata:
name: helm-hooks
annotations:
argocd.argoproj.io/sync-wave: "-1"
---
apiVersion: v1
kind: Namespace
metadata:
name: kustomize-guestbook
annotations:
argocd.argoproj.io/sync-wave: "-1"
---
apiVersion: v1
kind: Namespace
metadata:
name: sync-waves
annotations:
argocd.argoproj.io/sync-wave: "-1"

View File

@ -1,16 +0,0 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: sync-waves
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: sync-waves
server: {{ .Values.spec.destination.server }}
project: default
source:
path: sync-waves
repoURL: {{ .Values.spec.source.repoURL }}
targetRevision: {{ .Values.spec.source.targetRevision }}

View File

@ -1,6 +1,31 @@
spec:
destination:
server: https://kubernetes.default.svc
source:
repoURL: https://github.com/argoproj/argocd-example-apps
targetRevision: HEAD
config:
spec:
destination:
server: https://kubernetes.default.svc
source:
repoURL: https://github.com/argoproj/argocd-example-apps
targetRevision: HEAD
applications:
- name: blue-green
- name: guestbook
- name: helm-dependency
- name: helm-guestbook
- name: helm-hooks
- name: jsonnet-guestbook
- name: jsonnet-guestbook-tla
- name: ksonnet-guestbook
- name: kustomize-guestbook
- name: plugin-kasane
path: plugins/kasane
tool:
plugin:
name: kasane
- name: plugin-kustomized-helm
path: plugins/kustomized-helm
tool:
plugin:
name: kustomized-helm
- name: pre-post-sync
- name: sock-shop
- name: sync-waves