...
1#!/usr/bin/env bash
2
3set -xeuo pipefail
4
5# Put PVC in terminating
6kubectl delete pvc -n warehouse-system --all --wait=false
7# Delete pods so PVC can be removed
8kubectl delete pods -n warehouse-system --all --wait
9# Ensure PVC deleted
10kubectl delete pvc -n warehouse-system --all --wait
11# Re-apply PVC so cache is cleared and Lumper can update itself
12kubectl apply -n warehouse-system -f - <<EOF
13apiVersion: v1
14kind: PersistentVolumeClaim
15metadata:
16 name: lumper-cache
17spec:
18 resources:
19 requests:
20 storage: 3Gi
21 accessModes:
22 - ReadWriteOnce
23EOF
24# Chill and ponder things.
25echo "Give it at least five minutes before you ask anybody if it worked"
View as plain text