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

Defaults: replace docker with containerd as our default container_manager #8175

Merged

Conversation

cristicalin
Copy link
Contributor

@cristicalin cristicalin commented Nov 9, 2021

What type of PR is this?

/kind feature

What this PR does / why we need it:
This PR changes our default container_manager to containerd. This brings in more flexibility with the default out of the box experience since with containerd we can enable extra container runtimes like kata containers or gvisor and allows us to clean some legacy code in the CI.
I added specific jobs for docker on ubuntu18, ubuntu20, centos8, debian10 and debian11 to ensure we don't accidentally break docker support.

Which issue(s) this PR fixes:

Fixes #7985

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

**Replace docker with containerd as the default container_manager**

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 9, 2021
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 9, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 9, 2021
@floryut
Copy link
Member

floryut commented Nov 10, 2021

Wow, big work you are starting @cristicalin thank you 🙇

@cristicalin cristicalin force-pushed the default_to_containerd branch 2 times, most recently from 0aa6779 to 35f0457 Compare November 10, 2021 16:00
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 11, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 11, 2021
@cristicalin cristicalin force-pushed the default_to_containerd branch 6 times, most recently from eb0d445 to cfd86a9 Compare November 14, 2021 19:52
@cristicalin cristicalin force-pushed the default_to_containerd branch 7 times, most recently from 63b7189 to c99c22a Compare November 17, 2021 20:46
@cristicalin cristicalin force-pushed the default_to_containerd branch 2 times, most recently from b6fce08 to 58ea105 Compare November 21, 2021 09:56
* should run compatible with old settings, this means docker
* we need to run with a distro that has at least modern containerd,
  this means move from debian9 to debian10 to allow `containerd_version`
  to match between 2.17 and master
@cristicalin
Copy link
Contributor Author

I think this PR is now in good shape.

The 3 CI failures are like this:

  1. https://gitlab.com/kargo-ci/kubernetes-sigs-kubespray/-/jobs/1804745627 - debian9-macvlan - this needs some investigation
  2. https://gitlab.com/kargo-ci/kubernetes-sigs-kubespray/-/jobs/1804750376 - oel7 fix pending in OEL7: Fix CentOS7 Extras for OEL7 #8219
  3. https://gitlab.com/kargo-ci/kubernetes-sigs-kubespray/-/jobs/1804749484 - ubuntu16-weave (docker) needs pinned down containerd version

I would prefer to fix 1 and 3 in separate PRs.

/cc @floryut @oomichi @champtar what do you think?

Copy link
Member

@floryut floryut left a comment

Choose a reason for hiding this comment

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

I think this PR is now in good shape.

The 3 CI failures are like this:

  1. https://gitlab.com/kargo-ci/kubernetes-sigs-kubespray/-/jobs/1804745627 - debian9-macvlan - this needs some investigation
  2. https://gitlab.com/kargo-ci/kubernetes-sigs-kubespray/-/jobs/1804750376 - oel7 fix pending in OEL7: Fix CentOS7 Extras for OEL7 #8219
  3. https://gitlab.com/kargo-ci/kubernetes-sigs-kubespray/-/jobs/1804749484 - ubuntu16-weave (docker) needs pinned down containerd version

I would prefer to fix 1 and 3 in separate PRs.

/cc @floryut @oomichi @champtar what do you think?

I totally agree, big pr like that can't really be done in one shot otherwise it take way too much time and require a lot of works.

So fine by me to merge this as is and move forward with it 👍 great work there @cristicalin

@k8s-ci-robot
Copy link
Contributor

[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 /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 Nov 22, 2021
@floryut
Copy link
Member

floryut commented Nov 23, 2021

/cc @oomichi @EppO @champtar

@EppO
Copy link
Contributor

EppO commented Nov 23, 2021

Having etcd_kubeadm_enabled set to false and etcd_deployment_type to host by default is a big setback for me.

@floryut
Copy link
Member

floryut commented Nov 23, 2021

Having etcd_kubeadm_enabled set to false and etcd_deployment_type to host by default is a big step back for me.

Hum, this PR doesn't change etcd_kubeadm_enabled default 🤔
But indeed as the PR switch the container runtime to containerd by default, we can't keep etcd_deployment_type to docker otherwise the default setting for kubespray wouldn't work

@cristicalin
Copy link
Contributor Author

I contemplated switching etcd_kubeadm_enabled to true by default but it seems like changing unrelated settings, it would probably make sense to rework the scope of this variable to etcd_deployment_type: kubeadm.

For this PR I think it makes sense to keep the change as proposed and rework the duplicate variable meanings. And change the default after to rely on kubeadm.

@EppO
Copy link
Contributor

EppO commented Nov 25, 2021

ok let's switch container runtime to containerd to get rid of docker dependency, it's worth it.
But let's make etcd deployment use kubeadm by default in another PR

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 25, 2021
@k8s-ci-robot k8s-ci-robot merged commit e78bda6 into kubernetes-sigs:master Nov 25, 2021
@floryut floryut mentioned this pull request Dec 21, 2021
sakuraiyuta pushed a commit to sakuraiyuta/kubespray that referenced this pull request Apr 16, 2022
…ager (kubernetes-sigs#8175)

* Defaults: replace docker with containerd as our default container_manager

* CI: Use docker for download_localhost test

* Defaults: with container_manager=containerd we need etcd_deployment_type=host

* CI: Run weave jobs with docker

* CI: Vagrant don't download_force_cache

* CI: Fix upgrade tests

* should run compatible with old settings, this means docker
* we need to run with a distro that has at least modern containerd,
  this means move from debian9 to debian10 to allow `containerd_version`
  to match between 2.17 and master
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Jun 28, 2023
…ager (kubernetes-sigs#8175)

* Defaults: replace docker with containerd as our default container_manager

* CI: Use docker for download_localhost test

* Defaults: with container_manager=containerd we need etcd_deployment_type=host

* CI: Run weave jobs with docker

* CI: Vagrant don't download_force_cache

* CI: Fix upgrade tests

* should run compatible with old settings, this means docker
* we need to run with a distro that has at least modern containerd,
  this means move from debian9 to debian10 to allow `containerd_version`
  to match between 2.17 and master
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Petition to change the default container_manager to containerd
4 participants