mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 18:18:41 +00:00
[platform]: add migration for kube-rbac-proxy daemonset
Signed-off-by: kklinch0 <kklinch0@gmail.com>
This commit is contained in:
@@ -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=10
|
||||
VERSION=12
|
||||
|
||||
run_migrations() {
|
||||
if ! kubectl get configmap -n cozy-system cozystack-version; then
|
||||
|
||||
18
scripts/migrations/11
Normal file
18
scripts/migrations/11
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# Migration 11 --> 12
|
||||
|
||||
# Recreate daemonset kube-rbac-proxy
|
||||
|
||||
if kubectl get daemonset kube-rbac-proxy -n cozy-monitoring; then
|
||||
kubectl delete daemonset kube-rbac-proxy --cascade=orphan -n cozy-monitoring
|
||||
fi
|
||||
|
||||
if kubectl get helmrelease monitoring-agents -n cozy-monitoring; then
|
||||
timestamp=$(date --rfc-3339=ns)
|
||||
kubectl annotate helmrelease monitoring-agents -n cozy-monitoring \
|
||||
reconcile.fluxcd.io/forceAt="$timestamp" \
|
||||
reconcile.fluxcd.io/requestedAt="$timestamp" \
|
||||
--overwrite
|
||||
fi
|
||||
|
||||
kubectl delete pods -l app.kubernetes.io/component=kube-rbac-proxy -n cozy-monitoring
|
||||
Reference in New Issue
Block a user