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

Add back support for kubenet style networking with containerd #10651

Merged
merged 1 commit into from
Jan 24, 2021

Conversation

hakman
Copy link
Member

@hakman hakman commented Jan 24, 2021

Mostly reverting #10501.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 24, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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 area/api area/nodeup approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 24, 2021
@hakman hakman force-pushed the containerd-kubenet-style branch 3 times, most recently from 8cff486 to f9aef8b Compare January 24, 2021 17:11
@hakman
Copy link
Member Author

hakman commented Jan 24, 2021

Test results are good when forcing kubenet style networking with containerd:
https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kops/10651/pull-kops-e2e-k8s-containerd/1353390037454032896

@hakman hakman force-pushed the containerd-kubenet-style branch 5 times, most recently from 8b66a03 to 27f81f0 Compare January 24, 2021 18:21
@hakman
Copy link
Member Author

hakman commented Jan 24, 2021

/cc @justinsb @rifelpet

@@ -489,8 +488,8 @@ func RunCreateCluster(ctx context.Context, f *util.Factory, out io.Writer, c *Cr
if c.ContainerRuntime != "" {
cluster.Spec.ContainerRuntime = c.ContainerRuntime
}
if c.ContainerRuntime == "containerd" && components.UsesKubenet(cluster.Spec.Networking) {
return fmt.Errorf("--networking with CNI plugin is required for containerd")
if c.ContainerRuntime == "containerd" && c.Networking == "" {
Copy link
Member

Choose a reason for hiding this comment

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

we default to networking = kubenet correct? if the default --networking value now works with containerd then we should just drop this "if" statement altogether rather than require a --networking flag.

Copy link
Member Author

Choose a reason for hiding this comment

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

True. I wanted to force people to choose. Removed.

@hakman
Copy link
Member Author

hakman commented Jan 24, 2021

/retest

@rifelpet
Copy link
Member

/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 24, 2021
@k8s-ci-robot k8s-ci-robot merged commit 97c40a3 into kubernetes:master Jan 24, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Jan 24, 2021
@hakman hakman deleted the containerd-kubenet-style branch January 24, 2021 20:35
@hakman
Copy link
Member Author

hakman commented Jan 25, 2021

Just checked and the kope.io tests are running once again. The cherry-pick should be safe to merge to 1.19:
https://testgrid.k8s.io/kops-network-plugins#kops-aws-cni-kopeio

k8s-ci-robot added a commit that referenced this pull request Jan 29, 2021
…10651-upstream-release-1.19

Automated cherry pick of #10585: containerd: Add /etc/crictl config to enable crictl #10651: Add back support for kubenet style networking with containerd
// buildCNIConfigTemplateFile is responsible for creating a special template for setups using Kubenet
func (b *ContainerdBuilder) buildCNIConfigTemplateFile(c *fi.ModelBuilderContext) {
contents := `{
"cniVersion": "0.4.0",
Copy link
Member

Choose a reason for hiding this comment

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

This is a different configuration from the one we reverted - where did you get it from?

(I'm trying to track down the "Kubernetes e2e suite.[sig-network] Services should preserve source pod IP for traffic thru service cluster IP [LinuxOnly]" flakes)

Copy link
Member

@justinsb justinsb Feb 7, 2021

Choose a reason for hiding this comment

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

I proposed taking the upstream configuration in #10759

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried this version at some point, but more tests were failing. We can merge #10759 as an experiment as see what happens. PR tests are done with Calico.

The current config is very similar from what was reverted and was taken from :
https://github.com/containerd/containerd/blob/774cb16a446bf7210584a455b47e58d488455aab/script/setup/install-cni#L37-L68

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/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.

None yet

4 participants