diff --git a/migration/v0.16.x-v0.17.x/migrate-openid.sh b/migration/v0.16.x-v0.17.x/migrate-openid.sh index bfecb6f6a..0c0220e80 100755 --- a/migration/v0.16.x-v0.17.x/migrate-openid.sh +++ b/migration/v0.16.x-v0.17.x/migrate-openid.sh @@ -9,6 +9,9 @@ set -euo pipefail # Restart the master pods so that they mount the latest version of the secret after apply "${here}/../../bin/ck8s" ops kubectl sc delete pod -n elastic-system -l role=master +# Wait for master pod to be ready before updating the config +"${here}/../../bin/ck8s" ops kubectl sc wait --for=condition=ready pod -n elastic-system opendistro-es-master-0 +sleep 10 # Make the script executable "${here}/../../bin/ck8s" ops kubectl sc -n elastic-system exec opendistro-es-master-0 -- chmod +x ./plugins/opendistro_security/tools/securityadmin.sh # Run the script to update the configuration diff --git a/migration/v0.16.x-v0.17.x/upgrade-apps.md b/migration/v0.16.x-v0.17.x/upgrade-apps.md index 8b1c8a620..8c9750c92 100644 --- a/migration/v0.16.x-v0.17.x/upgrade-apps.md +++ b/migration/v0.16.x-v0.17.x/upgrade-apps.md @@ -19,12 +19,12 @@ 1. To upgrade kube-prometheus-stack from 12.8.0 to 16.6.1 you need to run: - ```bash - ./bin/ck8s ops kubectl sc apply -f 'helmfile/upstream/kube-prometheus-stack/crds' - ``` - ```bash - ./bin/ck8s ops kubectl wc apply -f 'helmfile/upstream/kube-prometheus-stack/crds' - ``` + ```bash + bin/ck8s ops kubectl sc apply -f 'helmfile/upstream/kube-prometheus-stack/crds' + ``` + ```bash + bin/ck8s ops kubectl wc apply -f 'helmfile/upstream/kube-prometheus-stack/crds' + ``` and then apply the new changes. @@ -34,6 +34,12 @@ bin/ck8s init ``` +1. Remove the old version of dex to then replace it with the new one by apply + + ```bash + bin/ck8s ops helmfile sc -l app=dex destroy + ``` + 1. Upgrade applications: ```bash @@ -42,9 +48,9 @@ 1. Restart the blackbox-prometheus-blackbox-exporter pod to make changes active. - ```bash - bin/ck8s ops kubectl sc get pods -n monitoring | awk '/blackbox/{print $1}'| xargs ./bin/ck8s ops kubectl sc delete -n monitoring pod - ``` + ```bash + bin/ck8s ops kubectl sc delete pod -l app.kubernetes.io/name=prometheus-blackbox-exporter -n monitoring + ``` 1. Run migration script: `./migration/v0.16.x-v0.17.x/migrate-openid.sh`