fix: chicken and egg problem (#57)

This commit is contained in:
Andrei Kvapil
2024-04-02 08:53:34 +02:00
committed by GitHub
parent c58db33712
commit 2e3314b2dd
4 changed files with 27 additions and 9 deletions

View File

@@ -20,8 +20,13 @@ flux_is_ok() {
}
install_basic_charts() {
bundle=$(kubectl get configmap -n cozy-system cozystack -o 'go-template={{index .data "bundle-name"}}')
if [ "$bundle" = "full-paas" ] || [ "$bundle" = "full-distro" ]; then
make -C packages/system/cilium apply
make -C packages/system/kubeovn apply
fi
if [ "$bundle" = "full-paas" ]; then
make -C packages/system/kubeovn apply
fi
make -C packages/system/fluxcd apply
}
@@ -33,9 +38,9 @@ run_migrations
# Install namespaces
make -C packages/core/platform namespaces-apply
# Install basic system charts
# Install fluxcd CRDs
if ! flux_is_ok; then
install_basic_charts
make -C packages/system/fluxcd apply-crds
fi
# Reconcile Helm repositories
@@ -44,6 +49,11 @@ kubectl annotate helmrepositories.source.toolkit.fluxcd.io -A -l cozystack.io/re
# Install platform chart
make -C packages/core/platform apply
# Install basic system charts (should be after platform chart applied)
if ! flux_is_ok; then
install_basic_charts
fi
# Reconcile platform chart
trap 'exit' INT TERM
while true; do