Commit 332edf8b authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #30816 from zmerlynn/aws-down-dangling-config

Automatic merge from submit-queue AWS: Handle kube-down case where the LaunchConfig is dangling **What this PR does / why we need it**: Fixed `cluster/kube-down.sh` on AWS in the case where no minions were started. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: N/A **Special notes for your reviewer**: N/A **Release note**: If we can't infer it from the tagged instances, assume we've created the $ASG_NAME.
parents 9ecee38f ec330895
...@@ -1345,6 +1345,11 @@ function kube-down { ...@@ -1345,6 +1345,11 @@ function kube-down {
done done
echo "All instances deleted" echo "All instances deleted"
fi fi
if [[ -n $(${AWS_ASG_CMD} describe-launch-configurations --launch-configuration-names ${ASG_NAME} --query LaunchConfigurations[].LaunchConfigurationName) ]]; then
echo "Warning: default auto-scaling launch configuration ${ASG_NAME} still exists, attempting to delete"
echo " (This may happen if kube-up leaves just the launch configuration but no auto-scaling group.)"
${AWS_ASG_CMD} delete-launch-configuration --launch-configuration-name ${ASG_NAME} || true
fi
find-master-pd find-master-pd
find-tagged-master-ip find-tagged-master-ip
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment