mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-03-21 21:41:17 +00:00
19 lines
957 B
Bash
Executable File
19 lines
957 B
Bash
Executable File
#!/bin/sh
|
|
# Migration 1 --> 2
|
|
|
|
# Fix mariadb-operator secrets
|
|
if kubectl get -n cozy-mariadb-operator secret/mariadb-operator-webhook-cert; then
|
|
kubectl annotate -n cozy-mariadb-operator secret/mariadb-operator-webhook-cert meta.helm.sh/release-namespace=cozy-mariadb-operator meta.helm.sh/release-name=mariadb-operator
|
|
kubectl label -n cozy-mariadb-operator secret/mariadb-operator-webhook-cert app.kubernetes.io/managed-by=Helm
|
|
fi
|
|
|
|
# Gratefully remove fluxcd release and keep resources
|
|
if kubectl get hr -n cozy-fluxcd cozy-fluxcd 2>/dev/null; then
|
|
kubectl patch hr -n cozy-fluxcd cozy-fluxcd -p '{"spec": {"suspend": true}, "metadata": {"finalizers": null}}' --type=merge
|
|
kubectl delete hr -n cozy-fluxcd cozy-fluxcd
|
|
fi
|
|
kubectl delete secret -n cozy-fluxcd -l name=fluxcd
|
|
|
|
# Write version to cozystack-version config
|
|
kubectl create configmap -n cozy-system cozystack-version --from-literal=version=2 --dry-run=client -o yaml | kubectl apply -f-
|