-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- modify istio-setup-telemetry.sh to show the port forward configuration - insert no script to delete NLB IP
- Loading branch information
1 parent
8b4a8a5
commit c7216a3
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
export ISTIOINGRESSIP=$(kubectl get svc -n istio-system | grep istio-ingressgateway | awk '{print $3}') | ||
export STATUS="" | ||
|
||
function deleteNLBIPs(){ | ||
array=("001" "002" "003") | ||
for i in "${array[@]}" | ||
do | ||
echo "" | ||
echo "------------------------------------------------------------------------" | ||
echo "Check $i" | ||
while : | ||
do | ||
FIND=$i | ||
HOSTNAME=$(ibmcloud ks nlb-dns ls --cluster $MYCLUSTER | grep $FIND | awk '{print $1}') | ||
echo "hostname: $HOSTNAME" | ||
if [ "$STATUS" = "$HOSTNAME" ]; then | ||
echo "$(date +'%F %H:%M:%S') Status: $FIND is not avaiable" | ||
echo "------------------------------------------------------------------------" | ||
break | ||
else | ||
ibmcloud ks nlb-dns rm classic --cluster $MYCLUSTER --ip $ISTIOINGRESSIP --nlb-host $HOSTNAME | ||
echo "$(date +'%F %H:%M:%S') Status: $FIND($HOSTNAME) deleted" | ||
echo "------------------------------------------------------------------------" | ||
break | ||
fi | ||
sleep 5 | ||
done | ||
done | ||
} | ||
|
||
ibmcloud ks nlb-dns ls --cluster $MYCLUSTER | ||
deleteNLBIPs | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters