git-pages helm chart
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# Scale down git-pages, run PVC cleanup (RWO), scale back up.
|
||||
set -euo pipefail
|
||||
|
||||
NAMESPACE="${NAMESPACE:?NAMESPACE is required}"
|
||||
DEPLOYMENT="${DEPLOYMENT:?DEPLOYMENT is required}"
|
||||
|
||||
echo "Scaling ${DEPLOYMENT} to 0..."
|
||||
kubectl scale "deployment/${DEPLOYMENT}" --replicas=0 -n "$NAMESPACE"
|
||||
kubectl wait --for=delete pod \
|
||||
-l "app.kubernetes.io/name=git-pages,app.kubernetes.io/instance=${INSTANCE}" \
|
||||
-n "$NAMESPACE" --timeout=180s
|
||||
|
||||
/scripts/retention-cleanup.sh
|
||||
|
||||
echo "Scaling ${DEPLOYMENT} to 1..."
|
||||
kubectl scale "deployment/${DEPLOYMENT}" --replicas=1 -n "$NAMESPACE"
|
||||
|
||||
echo "Retention job done."
|
||||
Reference in New Issue
Block a user