Skip to content

Commit 1f47921

Browse files
authored
Annotate blueapi PVCs with last-used timestamp
1 parent c9c6917 commit 1f47921

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

helm/blueapi/files/scripts/time-stamper.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# Get all PVCs currently mounted by running pods
33
MOUNTED_PVCS=$(kubectl get pods -n $RELEASE_NAMESPACE \
44
-o=jsonpath='{.items[*].spec.volumes[*].persistentVolumeClaim.claimName}' | tr ' ' '\n' | sort -u)
5-
NOW=$(date +%s)
5+
BLUEAPI_PVCS=$( echo $MOUNTED_PVCS | tr ' ' '\n' | grep blueapi-scratch)
66
#loop through all the pvcs annotating ones thare are mounted
7-
for pvc in $MOUNTED_PVCS; do
7+
NOW=$(date +%s)
8+
for pvc in $BLUEAPI_PVCS; do
89
kubectl annotate --overwrite pvc "$pvc" -n $RELEASE_NAMESPACE last-used="$NOW"
910
done

0 commit comments

Comments
 (0)