Refreshes Images in Case of New Image

This commit is contained in:
2023-10-15 02:35:36 -03:00
parent a208be6290
commit b95db2a673
3 changed files with 23 additions and 0 deletions

19
refresh.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
NAMESPACES=(
portfolio
)
DEPLOYMENTS=(
"frontend-deployment"
"backend-deployment"
"storage-deployment"
"storage-processor-deployment"
)
for i in "${NAMESPACES[@]}"; do
for x in "${DEPLOYMENTS[@]}"; do
PODS=$(kubectl -n $i get pods --no-headers | awk '{print $1}' | grep $x | tr '\n' ' ')
kubectl -n $i delete pods $PODS
done
done