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

Only download kubeadm images where needed #10899

Merged

Conversation

VannTen
Copy link
Contributor

@VannTen VannTen commented Feb 7, 2024

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

  1. Some cleanup of the download role in the kubeadm part (less facts, more vars, removing useless usage of default)
  2. Modify kubeadm images download dictionaries so we only download the images where needed. In particular, this will avoid downloading etcd and control plane images on all k8s_cluster nodes, which should save some time, particularly on big clusters.

Which issue(s) this PR fixes:

Fixes #9094

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

kubeadm images are now only downloaded where needed

Instead of setting multiples facts, we directly create the dict we need from
kubeadm output.
@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 7, 2024
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 7, 2024
Copy link
Contributor

@mzaian mzaian left a comment

Choose a reason for hiding this comment

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

Thanks @VannTen neat!

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 8, 2024
Copy link
Member

@MrFreezeex MrFreezeex left a comment

Choose a reason for hiding this comment

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

Thanks! Looks great 🎉
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 8, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MrFreezeex, mzaian, VannTen

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 4b0a134 into kubernetes-sigs:master Feb 8, 2024
65 checks passed
@kevin-emodo
Copy link

this merge broke the scale.yaml. Can you review it @VannTen?

@VannTen
Copy link
Contributor Author

VannTen commented Feb 22, 2024 via email

@FedericoHeichou
Copy link
Contributor

this merge broke the scale.yaml. Can you review it @VannTen?

Same as @kevin-emodo said.
Inside download : Download | Download files / images I receive 'kubeadm_images_raw' is undefined

VannTen added a commit to VannTen/kubespray that referenced this pull request Apr 22, 2024
)"

This reverts commit 4b0a134.

The mentionned PR break scale.yml. This goes back to the status quo
until a proper fix can be provided, at which point we'll reapply the
PR.
@mzaian mzaian mentioned this pull request Apr 26, 2024
k8s-ci-robot pushed a commit that referenced this pull request Apr 29, 2024
This reverts commit 4b0a134.

The mentionned PR break scale.yml. This goes back to the status quo
until a proper fix can be provided, at which point we'll reapply the
PR.
dibi-codes pushed a commit to fino-digital/kubespray that referenced this pull request May 7, 2024
* Refactor of kubeadm images listing

Instead of setting multiples facts, we directly create the dict we need from
kubeadm output.

* Remove useless 'default' filters in roles/download

* Only download kubeadm images where needed
dibi-codes pushed a commit to fino-digital/kubespray that referenced this pull request May 7, 2024
)" (kubernetes-sigs#11105)

This reverts commit 4b0a134.

The mentionned PR break scale.yml. This goes back to the status quo
until a proper fix can be provided, at which point we'll reapply the
PR.
pedro-peter pushed a commit to pedro-peter/kubespray that referenced this pull request May 8, 2024
* Refactor of kubeadm images listing

Instead of setting multiples facts, we directly create the dict we need from
kubeadm output.

* Remove useless 'default' filters in roles/download

* Only download kubeadm images where needed
pedro-peter pushed a commit to pedro-peter/kubespray that referenced this pull request May 8, 2024
)" (kubernetes-sigs#11105)

This reverts commit 4b0a134.

The mentionned PR break scale.yml. This goes back to the status quo
until a proper fix can be provided, at which point we'll reapply the
PR.
Rickkwa pushed a commit to Rickkwa/kubespray that referenced this pull request Jun 26, 2024
)" (kubernetes-sigs#11105)

This reverts commit 4b0a134.

The mentionned PR break scale.yml. This goes back to the status quo
until a proper fix can be provided, at which point we'll reapply the
PR.
davidumea pushed a commit to elastisys/kubespray that referenced this pull request Oct 25, 2024
)" (kubernetes-sigs#11105)

This reverts commit 4b0a134.

The mentionned PR break scale.yml. This goes back to the status quo
until a proper fix can be provided, at which point we'll reapply the
PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

images for control plane are downloaded on compute nodes
6 participants