New schema version 10

BREAKING: all kuberneteses will be upgraded to chart version 0.15.1
This commit is contained in:
Timofei Larkin
2025-02-24 16:31:30 +03:00
parent 77df31e105
commit b32106484f
6 changed files with 14 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ set -o pipefail
set -e
BUNDLE=$(set -x; kubectl get configmap -n cozy-system cozystack -o 'go-template={{index .data "bundle-name"}}')
VERSION=9
VERSION=10
run_migrations() {
if ! kubectl get configmap -n cozy-system cozystack-version; then

View File

@@ -1,5 +1,5 @@
#!/bin/sh
# Migration 7 --> 9
# Migration 8 --> 9
if kubectl get clusterrolebinding kubeapps-admin-group; then
kubectl delete clusterrolebinding kubeapps-admin-group

8
scripts/migrations/9 Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/sh
# Migration 9 --> 10
# Upgrade kubernetes.apps to new chart version
kubectl get kuberneteses.apps.cozystack.io -A -o yaml | sed -r -e 's/^ appVersion: [0-9.]+$/ appVersion: 0.15.1/' | kubectl apply -f-
# Write version to cozystack-version config
kubectl create configmap -n cozy-system cozystack-version --from-literal=version=10 --dry-run=client -o yaml | kubectl apply -f-