Merge pull request #13 from Heavybullets8/ext-svc-check

Ext svc check
This commit is contained in:
Heavybullets8 2022-08-24 11:27:49 +00:00 committed by GitHub
commit ea2031652d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@ echo "Asynchronous Updates: $update_limit"
[[ -z $timeout ]] && echo "Default Timeout: 500" && timeout=500 || echo "Custom Timeout: $timeout" [[ -z $timeout ]] && echo "Default Timeout: 500" && timeout=500 || echo "Custom Timeout: $timeout"
[[ "$timeout" -le 120 ]] && echo "Warning: Your timeout is set low and may lead to premature rollbacks or skips" [[ "$timeout" -le 120 ]] && echo "Warning: Your timeout is set low and may lead to premature rollbacks or skips"
pool=$(cli -c 'app kubernetes config' | grep -E "dataset\s\|" | awk -F '|' '{print $3}' | awk -F '/' '{print $1}' | tr -d " \t\n\r") pool=$(cli -c 'app kubernetes config' | grep -E "dataset\s\|" | awk -F '|' '{print $3}' | awk -F '/' '{print $1}' | tr -d " \t\n\r")
rm external_services 2>/dev/null # TODO remove later
it=0 it=0
while_count=0 while_count=0
rm deploying 2>/dev/null rm deploying 2>/dev/null
@ -92,7 +92,7 @@ fi
[[ ! -e external_services ]] && touch external_services [[ ! -e external_services ]] && touch external_services
if ! grep -qs "^$app_name," external_services ; then if ! grep -qs "^$app_name," external_services ; then
if ! grep qs "/external-service" /mnt/"$pool"/ix-applications/releases/"$app_name"/charts/"$(find /mnt/"$pool"/ix-applications/releases/"$app_name"/charts/ -maxdepth 1 -type d -printf '%P\n' | sort -r | head -n 1)"/Chart.yaml 2>/dev/null; then if ! grep -qs "/external-service" /mnt/"$pool"/ix-applications/releases/"$app_name"/charts/"$(find /mnt/"$pool"/ix-applications/releases/"$app_name"/charts/ -maxdepth 1 -type d -printf '%P\n' | sort -r | head -n 1)"/Chart.yaml; then
echo "$app_name,false" >> external_services echo "$app_name,false" >> external_services
else else
echo "$app_name,true" >> external_services echo "$app_name,true" >> external_services