-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
implement download mirrors support #8474
implement download mirrors support #8474
Conversation
2ec7151
to
575439f
Compare
575439f
to
bde6a1b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cristicalin Sorry I missed this one 👍
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cristicalin, floryut The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this @cristicalin
That seems good for me, just one question.
@@ -47,11 +47,40 @@ | |||
- download_force_cache | |||
- not download_localhost | |||
|
|||
# We check a number of mirrors that may hold the file and pick a working one at random | |||
# This task will avoid logging it's parameters to not leak environment passwords in the log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to see which URL doesn't work to know the URL needs to be updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not with the current logic since we put the no_log
flag on the download task, the error is obscured, including any parameters like the URL. I could add a second task to log the results though that also has some potential to leak credentials if they are embedded in the url.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
It is fine to go with current one.
When facing a maintenance issue, we will be able to add some log to know which URLs got old.
/lgtm
* master: Configure Etcd container_manager explicitly (kubernetes-sigs#8521) Fix print_hostnames of inventory.py (kubernetes-sigs#8554) Fix etcd_events not getting upgraded in upgrade-cluster.yml (kubernetes-sigs#8550) nerdctl: upgrade to 0.16.1 (kubernetes-sigs#8539) Allow pausing after upgrade but before uncordon (kubernetes-sigs#8530) [calico] upgrade release checksums (kubernetes-sigs#8544) Allow to specify a source address for metallb peerings, and target only some nodes using node selectors (kubernetes-sigs#8534) add support for Dual Stack node InternalIP (kubernetes-sigs#8542) terraform/gcp: Allow to change extra disk types (kubernetes-sigs#8524) add support for Calico IP6_AUTODETECTION_METHOD (kubernetes-sigs#8541) implement download mirrors support (kubernetes-sigs#8474) Fix: Error when creating subnets more than AZ (kubernetes-sigs#8516) feat(offline): Improve generate_list.sh to generate offline file list using ansible (kubernetes-sigs#8537) (kubernetes-sigs#8538) docs: Update offline-environment.md for containerd (kubernetes-sigs#8520) (kubernetes-sigs#8523) Change Cilium setting identity_allocation_mode to cilium_identity_allocation_mode (kubernetes-sigs#8519) Fix wrong port name in metallb.yml.j2 (kubernetes-sigs#8510)
* [download] add mechanism to support mirrors * [calico] support alternate download url
@cristicalin The older url is now 404 (see #8915). |
* [download] add mechanism to support mirrors * [calico] support alternate download url
* [download] add mechanism to support mirrors * [calico] support alternate download url
This reverts commit c6e5314. There is no user of the download mirrors support in kubespray, for a long time.
This reverts commit c6e5314. There is no user of the download mirrors support in kubespray, for a long time.
…ubernetes-sigs#10884) This reverts commit c6e5314. There is no user of the download mirrors support in kubespray, for a long time.
…ubernetes-sigs#10884) This reverts commit c6e5314. There is no user of the download mirrors support in kubespray, for a long time.
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR implements a mechanism to download files from alternate locations if possible. The functionality is added to the download role to support a
mirrors
key in thedownloads
dict which will be used to select a viable mirror. The actual mirror to be used during the download is selected as a random choice between all valid mirrors.Since calico is publishing their artifacts in multiple locations, this PR implements a sample
mirrors
configuration forcalicoctl
download location.Which issue(s) this PR fixes:
Fixes #8427
Special notes for your reviewer:
Does this PR introduce a user-facing change?: