This document explains how to set up Argo CD for Unguard.
1. Install Argo CD as described in the documentation.
To ensure that MariaDB is installed before Unguard we utilize Argo CD's sync waves. To enable them for the app-of-apps pattern Argo CD needs to be configured as described here.
TLDR, apply the following command:
kubectl apply -n argocd -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
namespace: argocd
labels:
app.kubernetes.io/name: argocd-cm
app.kubernetes.io/part-of: argocd
data:
resource.customizations: |
argoproj.io/Application:
health.lua: |
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
EOF
kubectl apply -n argocd -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
name: unguard-infra
namespace: argocd
labels:
argocd.argoproj.io/secret-type: repository
stringData:
url: https://github.com/MfCrizz/unguard-infra.git
username: not-used
EOF
Apply the root Argo CD application resource for your cluster.
kubectl apply -n argocd -f unguard/unguard-root.yaml