Skip to content

Commit efaa145

Browse files
committed
[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 <[email protected]>
1 parent 21ca134 commit efaa145

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

  • packages/core/installer/images/cozystack
  • scripts/migrations

‎packages/core/installer/images/cozystack/Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ RUN make repos
3232

3333
FROM alpine:3.22
3434

35-
RUN wget -O- https://github.com/cozystack/cozypkg/raw/refs/heads/main/hack/install.sh | sh -s -- -v 1.1.0
35+
RUN wget -O- https://github.com/cozystack/cozypkg/raw/refs/heads/main/hack/install.sh | sh -s -- -v 1.2.0
3636

3737
RUN apk add --no-cache make kubectl coreutils git jq
3838

‎scripts/migrations/20‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@ kubectl delete crd cozystackresourcedefinitions.cozystack.io --ignore-not-found
99

1010
timestamp=$(date --rfc-3339=ns)
1111
# Make sure webhook is upgraded first, then run migration
12-
if kubectl get helmrelease cozystack-controller -n cozy-system; then
13-
kubectl annotate helmrelease cozystack-controller -n cozy-system \
14-
reconcile.fluxcd.io/forceAt="$timestamp" \
15-
reconcile.fluxcd.io/requestedAt="$timestamp" \
16-
--overwrite
17-
kubectl wait hr/cozystack-controller -n cozy-system --timeout=4m --for=condition=ready || exit 1
18-
fi
12+
cozypkg -C packages/system/cozystack-controller -n cozy-system reconcile cozystack-controller --force --with-source
13+
cozypkg -C packages/system/cozystack-api -n cozy-system reconcile cozystack-api --force --with-source
1914
kubectl get namespace -o custom-columns=NAME:.metadata.name --no-headers |
2015
grep '^tenant-' |
2116
while read namespace ; do

0 commit comments

Comments
 (0)