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

Install CNI network plugins only for specific CNIs #17162

Merged
merged 6 commits into from
Jan 3, 2025

Conversation

hakman
Copy link
Member

@hakman hakman commented Jan 2, 2025

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/api area/nodeup size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 2, 2025
@hakman hakman changed the title Install CNI network plugins only for specific CNIs WIP Install CNI network plugins only for specific CNIs Jan 2, 2025
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 2, 2025
defaultCNIAssetAmd64K8s_27 = "https://storage.googleapis.com/k8s-artifacts-cni/release/v1.2.0/cni-plugins-linux-amd64-v1.2.0.tgz"
defaultCNIAssetArm64K8s_27 = "https://storage.googleapis.com/k8s-artifacts-cni/release/v1.2.0/cni-plugins-linux-arm64-v1.2.0.tgz"

defaultCNIAssetAmd64K8s_29 = "https://storage.googleapis.com/k8s-artifacts-cni/release/v1.3.0/cni-plugins-linux-amd64-v1.3.0.tgz"
Copy link
Member

Choose a reason for hiding this comment

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

We keep this is in WIP until we get some consensus about mirroring CNI to artifacts.k8s.io?

Copy link
Member Author

Choose a reason for hiding this comment

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

Doesn't matter much, as this is for kOps 1.32, which is early alpha. For sure we will add mirrors for this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, please not that the top 3 use CNIs don't need those binaries, so even without mirrors, it should not be very demanding.

Copy link
Member Author

Choose a reason for hiding this comment

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

Mirrors added 😄

@ameukam
Copy link
Member

ameukam commented Jan 2, 2025

We don't want to generate assets for CNI plugins ? I don't see any change in pkg/assets/assetdata/cni.yaml or am I wrong ?

@hakman
Copy link
Member Author

hakman commented Jan 2, 2025

We don't want to generate assets for CNI plugins ? I don't see any change in pkg/assets/assetdata/cni.yaml or am I wrong ?

We want, but did not have time for that yet. 😁

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 2, 2025
@hakman hakman changed the title WIP Install CNI network plugins only for specific CNIs Install CNI network plugins only for specific CNIs Jan 2, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 2, 2025
@hakman hakman requested a review from ameukam January 2, 2025 18:10
@ameukam
Copy link
Member

ameukam commented Jan 3, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 3, 2025
@hakman
Copy link
Member Author

hakman commented Jan 3, 2025

/test all

@hakman
Copy link
Member Author

hakman commented Jan 3, 2025

@rifelpet If you get a chance, could you take a look at this? Thanks!

Comment on lines 33 to 35
if b.NodeupConfig.Networking.AmazonVPC == nil &&
b.NodeupConfig.Networking.Calico == nil &&
b.NodeupConfig.Networking.Cilium == nil {
Copy link
Member

Choose a reason for hiding this comment

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

can we reuse the new logic in pkg/apis/kops/model/instance_group.go ? that way we dont have to remember to update the same conditional in two places.

Copy link
Member Author

Choose a reason for hiding this comment

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

sure, done

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 3, 2025
@hakman hakman requested a review from rifelpet January 3, 2025 19:44
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 3, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rifelpet

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 3, 2025
@k8s-ci-robot k8s-ci-robot merged commit 6b0d029 into kubernetes:master Jan 3, 2025
24 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.31 milestone Jan 3, 2025
@hakman hakman deleted the cni-updates branch January 3, 2025 21:01
@rifelpet rifelpet modified the milestones: v1.31, v1.32 Jan 7, 2025
@@ -40,6 +40,12 @@ var wellKnownMirrors = []mirrorConfig{
"https://github.com/kubernetes/kops/releases/download/v{kopsVersion}/",
},
},
{
Base: "https://storage.googleapis.com/k8s-artifacts-cni/release/",
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't we invert this?

long term we'd like to eliminate this host, we have been exiting making kubernetes responsible for hosting third party assets, especially on non-rate-limited hosts that we pay for (And it seems the main use case to not just fetch from github is bypassing their rate limits)

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, the main use case is bypassing the rate limits.
We started discussing inverting this today, but no conclusion yet. The initial intention was to keep this consistent and decide later which ones to change to the mirror as primary.
@justinsb any preference on how to approach this?

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, the main use case is bypassing the rate limits.

Yeah, the problem is this then makes us responsible for no rate limit, I think if users are pulling so much that github is blocking them, then they probably need to use their own mirror or something?

We have been rate limiting other hosts like registry.k8s.io, but that's not possible here without moving to a different host (at which point ... just use github / official downloads?)

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. area/api area/nodeup cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants