diff --git a/packages/apps/virtual-machine/templates/secret.yaml b/packages/apps/virtual-machine/templates/secret.yaml index af104234..73cd92bf 100644 --- a/packages/apps/virtual-machine/templates/secret.yaml +++ b/packages/apps/virtual-machine/templates/secret.yaml @@ -11,12 +11,10 @@ stringData: {{- end }} {{- if or .Values.cloudInit .Values.sshKeys }} --- -apiVersion: core.cozystack.io/v1alpha1 -kind: TenantSecret +apiVersion: v1 +kind: Secret metadata: name: {{ include "virtual-machine.fullname" . }}-cloud-init - labels: - apps.cozystack.io/virtual-machine: {{ .Release.Name }} stringData: userdata: | {{- if .Values.cloudInit }} diff --git a/scripts/installer.sh b/scripts/installer.sh index f8165938..8dfa68ee 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -89,8 +89,8 @@ kubectl get hr -A -o go-template='{{ range .items }}{{ if .spec.suspend }}{{ .sp esac done -# TODO: Update all Cozystack managed charts to latest version -# kubectl get hr -A -l cozystack.io/ui=true --no-headers | awk '{print "kubectl patch helmrelease -n " $1 " " $2 " --type=merge -p '\''{\"spec\":{\"chart\":{\"spec\":{\"version\":\"*\"}}}}'\'' "}' | sh -x +# Update all Cozystack managed charts to latest version +kubectl get hr -A -l cozystack.io/ui=true --no-headers | awk '{print "kubectl patch helmrelease -n " $1 " " $2 " --type=merge -p '\''{\"spec\":{\"chart\":{\"spec\":{\"version\":\">= 0.0.0-0\"}}}}'\'' "}' | sh -x # Reconcile platform chart trap 'exit' INT TERM diff --git a/scripts/migrations/20 b/scripts/migrations/20 index 411bb517..68e22cf2 100755 --- a/scripts/migrations/20 +++ b/scripts/migrations/20 @@ -4,10 +4,9 @@ set -euo pipefail kubectl delete ingresses.networking.k8s.io --all -n cozy-dashboard --ignore-not-found -kubectl delete cozystackresourcedefinitions --all-namespaces --all --ignore-not-found kubectl delete crd cozystackresourcedefinitions.cozystack.io --ignore-not-found -timestamp=$(date --rfc-3339=ns) +timestamp=$(date --rfc-3339=ns || date) # Make sure webhook is upgraded first, then run migration 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 @@ -20,7 +19,7 @@ kubectl get namespace -o custom-columns=NAME:.metadata.name --no-headers | kubectl annotate \ pods,services,pvc,secrets,ingresses.networking.k8s.io,workloadmonitors.cozystack.io \ -n "$namespace" --all \ - migration.cozystack.io="$timestamp" --overwrite) + migration.cozystack.io="$timestamp" --overwrite || true) done # Stamp version kubectl create configmap -n cozy-system cozystack-version \