We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29a5482 commit 2881315Copy full SHA for 2881315
1 file changed
helm/blueapi/templates/configmap.yaml
@@ -52,8 +52,10 @@ data:
52
NOW=$(date +%s)
53
#loop through all the pvcs annotating ones thare are mounted or lack a last-used stamp
54
for pvc in $ALL_PVC; do
55
+ # Checks if Annotation for last-used is empty
56
ANNOTATION=$(kubectl get pvc "$pvc" -n {{ .Release.Namespace }} -o=jsonpath='{.metadata.annotations.last-used}')
- 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
59
kubectl annotate --overwrite pvc "$pvc" -n {{ .Release.Namespace }} last-used="$NOW"
60
elif echo "$MOUNTED_PVCS" | grep -qx "$pvc"; then
61
0 commit comments