mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 10:18:39 +00:00
[installer] Update cozypkg and improve migration 20
This patch makes sure that migration #20 really uses the very latest chart versions by forcing a reconcile with cozypkg, instead of annotating the underlying HelmRelease. ```release-note [installer] Update cozypkg in installer and use it to bulletproof the 20th migration script by reconciling the HelmReleases with the --with-source flag. ``` Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
This commit is contained in:
@@ -32,7 +32,7 @@ RUN make repos
|
||||
|
||||
FROM alpine:3.22
|
||||
|
||||
RUN wget -O- https://github.com/cozystack/cozypkg/raw/refs/heads/main/hack/install.sh | sh -s -- -v 1.1.0
|
||||
RUN wget -O- https://github.com/cozystack/cozypkg/raw/refs/heads/main/hack/install.sh | sh -s -- -v 1.2.0
|
||||
|
||||
RUN apk add --no-cache make kubectl coreutils git jq
|
||||
|
||||
|
||||
@@ -9,13 +9,10 @@ kubectl delete crd cozystackresourcedefinitions.cozystack.io --ignore-not-found
|
||||
|
||||
timestamp=$(date --rfc-3339=ns)
|
||||
# Make sure webhook is upgraded first, then run migration
|
||||
if kubectl get helmrelease cozystack-controller -n cozy-system; then
|
||||
kubectl annotate helmrelease cozystack-controller -n cozy-system \
|
||||
reconcile.fluxcd.io/forceAt="$timestamp" \
|
||||
reconcile.fluxcd.io/requestedAt="$timestamp" \
|
||||
--overwrite
|
||||
kubectl wait hr/cozystack-controller -n cozy-system --timeout=4m --for=condition=ready || exit 1
|
||||
fi
|
||||
cozypkg -C packages/system/cozystack-controller -n cozy-system reconcile cozystack-controller --force --with-source
|
||||
kubectl wait hr/cozystack-controller -n cozy-system --timeout=4m --for=condition=ready || exit 1
|
||||
cozypkg -C packages/system/cozystack-api -n cozy-system reconcile cozystack-api --force --with-source
|
||||
kubectl wait hr/cozystack-api -n cozy-system --timeout=4m --for=condition=ready || exit 1
|
||||
kubectl get namespace -o custom-columns=NAME:.metadata.name --no-headers |
|
||||
grep '^tenant-' |
|
||||
while read namespace ; do
|
||||
|
||||
Reference in New Issue
Block a user