Skip to content

Commit

Permalink
Merge pull request #4001 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…3977-to-release-1.10

[release-1.10] Set cloud provider config to have shorter cache ttl
  • Loading branch information
k8s-ci-robot authored Sep 14, 2023
2 parents cccde07 + 570d1f8 commit e246d4b
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions hack/create-custom-cloud-provider-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ source "${REPO_ROOT}/hack/common-vars.sh"

make --directory="${REPO_ROOT}" "${KUBECTL##*/}"

# Test cloud provider config with shorter cache ttl
CLOUD_PROVIDER_CONFIG="https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/tests/k8s-azure/manifest/cluster-api/cloud-config-vmss-short-cache-ttl.json"
if [[ -n "${CUSTOM_CLOUD_PROVIDER_CONFIG:-}" ]]; then
curl --retry 3 -sL -o tmp_azure_json "${CUSTOM_CLOUD_PROVIDER_CONFIG}"
envsubst < tmp_azure_json > azure_json
"${KUBECTL}" delete secret "${CLUSTER_NAME}-control-plane-azure-json" || true
"${KUBECTL}" create secret generic "${CLUSTER_NAME}-control-plane-azure-json" \
--from-file=control-plane-azure.json=azure_json \
--from-file=worker-node-azure.json=azure_json
rm tmp_azure_json azure_json
CLOUD_PROVIDER_CONFIG="${CUSTOM_CLOUD_PROVIDER_CONFIG:-}"
fi

curl --retry 3 -sL -o tmp_azure_json "${CLOUD_PROVIDER_CONFIG}"
envsubst < tmp_azure_json > azure_json
"${KUBECTL}" delete secret "${CLUSTER_NAME}-control-plane-azure-json" || true
"${KUBECTL}" create secret generic "${CLUSTER_NAME}-control-plane-azure-json" \
--from-file=control-plane-azure.json=azure_json \
--from-file=worker-node-azure.json=azure_json
rm tmp_azure_json azure_json

0 comments on commit e246d4b

Please sign in to comment.