mirror of https://github.com/kubernetes/kops.git
Merge pull request #6090 from gas-buddy/eherot/autoscaler_curl_support
Automagically use curl instead of wget if that's what's available
This commit is contained in:
commit
323b51ac54
|
@ -93,7 +93,16 @@ aws iam attach-role-policy --policy-arn $ASG_POLICY_ARN --role-name $IAM_ROLE
|
||||||
printf " ✅ \n"
|
printf " ✅ \n"
|
||||||
|
|
||||||
addon=cluster-autoscaler.yml
|
addon=cluster-autoscaler.yml
|
||||||
wget -O ${addon} https://raw.githubusercontent.com/kubernetes/kops/master/addons/cluster-autoscaler/v1.8.0.yaml
|
manifest_url=https://raw.githubusercontent.com/kubernetes/kops/master/addons/cluster-autoscaler/v1.8.0.yaml
|
||||||
|
|
||||||
|
if [[ $(which wget) ]]; then
|
||||||
|
wget -O ${addon} ${manifest_url}
|
||||||
|
elif [[ $(which curl) ]]; then
|
||||||
|
curl -s -o ${addon} ${manifest_url}
|
||||||
|
else
|
||||||
|
echo "No curl or wget available. Can't get the manifest."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
sed -i -e "s@{{CLOUD_PROVIDER}}@${CLOUD_PROVIDER}@g" "${addon}"
|
sed -i -e "s@{{CLOUD_PROVIDER}}@${CLOUD_PROVIDER}@g" "${addon}"
|
||||||
sed -i -e "s@{{IMAGE}}@${IMAGE}@g" "${addon}"
|
sed -i -e "s@{{IMAGE}}@${IMAGE}@g" "${addon}"
|
||||||
|
|
Loading…
Reference in New Issue