Skip to content

Commit 2881315

Browse files
committed
better comments
1 parent 29a5482 commit 2881315

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

helm/blueapi/templates/configmap.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ data:
5252
NOW=$(date +%s)
5353
#loop through all the pvcs annotating ones thare are mounted or lack a last-used stamp
5454
for pvc in $ALL_PVC; do
55+
# Checks if Annotation for last-used is empty
5556
ANNOTATION=$(kubectl get pvc "$pvc" -n {{ .Release.Namespace }} -o=jsonpath='{.metadata.annotations.last-used}')
56-
if [ -z "$ANNOTATION" ]; then
57+
# -z checks if ANNOTATION is empty, if its empty or mounted to updates last-used else it ignores it
58+
if [ -z "$ANNOTATION" ]; then
5759
kubectl annotate --overwrite pvc "$pvc" -n {{ .Release.Namespace }} last-used="$NOW"
5860
elif echo "$MOUNTED_PVCS" | grep -qx "$pvc"; then
5961
kubectl annotate --overwrite pvc "$pvc" -n {{ .Release.Namespace }} last-used="$NOW"

0 commit comments

Comments
 (0)