mirror of
https://github.com/khuedoan/homelab.git
synced 2025-02-07 01:28:42 +07:00
feat(bootstrap): add health check and sync wave for ApplicationSets
This commit is contained in:
parent
d034851e56
commit
38cacd468f
@ -12,4 +12,4 @@ argocd:
|
||||
|
||||
.PHONY: root-app
|
||||
root-app:
|
||||
kustomize build ./root-app | kubectl apply -f -
|
||||
kubectl apply -f root-app/applicationsets/bootstrap.yaml
|
||||
|
@ -16,3 +16,16 @@ data:
|
||||
end
|
||||
end
|
||||
return hs
|
||||
resource.customizations.health.argoproj.io_ApplicationSet: |
|
||||
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
|
||||
|
@ -2,6 +2,8 @@ apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: apps
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "4"
|
||||
spec:
|
||||
generators:
|
||||
- git:
|
||||
@ -12,8 +14,6 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
name: '{{path.basename}}'
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "4"
|
||||
spec:
|
||||
destination:
|
||||
name: in-cluster
|
||||
|
@ -2,6 +2,8 @@ apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: bootstrap
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "1"
|
||||
spec:
|
||||
generators:
|
||||
- git:
|
||||
@ -12,8 +14,6 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
name: '{{path.basename}}'
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "1"
|
||||
spec:
|
||||
destination:
|
||||
name: in-cluster
|
||||
|
@ -2,6 +2,8 @@ apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: platform
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "3"
|
||||
spec:
|
||||
generators:
|
||||
- git:
|
||||
@ -12,8 +14,6 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
name: '{{path.basename}}'
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "3"
|
||||
spec:
|
||||
destination:
|
||||
name: in-cluster
|
||||
|
@ -2,6 +2,8 @@ apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: system
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "2"
|
||||
spec:
|
||||
generators:
|
||||
- git:
|
||||
@ -12,8 +14,6 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
name: '{{path.basename}}'
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "2"
|
||||
spec:
|
||||
destination:
|
||||
name: in-cluster
|
||||
|
Loading…
Reference in New Issue
Block a user