Skip to content

Commit

Permalink
add quickstart.apps-of-apps.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
kromanow94 committed Mar 20, 2024
1 parent d46d13b commit 9d80a0d
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions example/helm/quickstart.apps-of-apps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
set -ex

kubectl create namespace argocd || true
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

# To enable sync-waves for ArgoCD Applications, argocd-cm has to be patched to
# enable the health assessment of applications which has been removed in version
# 1.8 of ArgoCD.
# This is based on:
# https://kubito.dev/posts/enable-argocd-sync-wave-between-apps/
kubectl patch configmap argocd-cm -n argocd --type merge --patch '
data:
resource.customizations.health.argoproj.io_Application: |
hs = {}
hs.status = "Progressing"
hs.message = ""
if obj.status ~= nil then
if obj.status.health ~= nil then
hs.status = obj.status.health.status
if obj.status.health.message ~= nil then
hs.message = obj.status.health.message
end
end
end
return hs
'

kubectl wait pods --namespace argocd --all --for=condition=Ready --timeout 300s

kubectl apply -f app.app-of-apps.yaml

0 comments on commit 9d80a0d

Please sign in to comment.