Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set cloud provider config to have shorter cache ttl #3977

Merged
merged 1 commit into from
Sep 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test suggests we don't know yet if the shorter cache ttl will work. @lzhecheng do we want to merge this change anyway? lgtm overall.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.
The purpose is to shorten the period of time "before node shutdown taint and node out-of-service taint are added" for feature non-graceful-node-shutdown. PR.
Shorter cache ttl needs testing before applied in AKS.

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