release v0.2.0 (#54)

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
Andrei Kvapil
2024-04-04 15:55:58 +02:00
committed by GitHub
parent f03f083c1a
commit e245d541b2
11 changed files with 30 additions and 19 deletions

View File

@@ -1,11 +1,14 @@
#!/bin/sh
VERSION=2
set -o pipefail
set -e
BUNDLE=$(set -x; kubectl get configmap -n cozy-system cozystack -o 'go-template={{index .data "bundle-name"}}')
VERSION=2
run_migrations() {
if ! kubectl get configmap -n cozy-system cozystack-version; then
kubectl create configmap -n cozy-system cozystack-version --from-literal=version="$VERSION" --dry-run=client -o yaml | kubectl create -f-
return
fi
current_version=$(kubectl get configmap -n cozy-system cozystack-version -o jsonpath='{.data.version}') || true
until [ "$current_version" = "$VERSION" ]; do
@@ -20,11 +23,10 @@ flux_is_ok() {
}
install_basic_charts() {
bundle=$(kubectl get configmap -n cozy-system cozystack -o 'go-template={{index .data "bundle-name"}}')
if [ "$bundle" = "paas-full" ] || [ "$bundle" = "distro-full" ]; then
if [ "$BUNDLE" = "paas-full" ] || [ "$BUNDLE" = "distro-full" ]; then
make -C packages/system/cilium apply
fi
if [ "$bundle" = "paas-full" ]; then
if [ "$BUNDLE" = "paas-full" ]; then
make -C packages/system/kubeovn apply
fi
}

View File

@@ -14,5 +14,12 @@ if kubectl get hr -n cozy-fluxcd cozy-fluxcd 2>/dev/null; then
fi
kubectl delete secret -n cozy-fluxcd -l name=fluxcd
# Fix kubeovn crds
kubeovn_crds=$(kubectl get crd -o name | grep '\.kubeovn\.io$')
if [ -n "$kubeovn_crds" ]; then
kubectl annotate $kubeovn_crds meta.helm.sh/release-namespace=cozy-kubeovn meta.helm.sh/release-name=kubeovn
kubectl label $kubeovn_crds app.kubernetes.io/managed-by=Helm
fi
# 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-