Skip to content

Commit

Permalink
Defaults: replace docker with containerd as our default container_man…
Browse files Browse the repository at this point in the history
…ager
  • Loading branch information
cristicalin committed Nov 9, 2021
1 parent b7ae4a2 commit c3e7b63
Show file tree
Hide file tree
Showing 23 changed files with 122 additions and 59 deletions.
42 changes: 31 additions & 11 deletions .gitlab-ci/packet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ packet_ubuntu18-calico-aio:
extends: .packet_pr
when: on_success

packet_ubuntu18-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success

packet_ubuntu20-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success

# Future AIO job
packet_ubuntu20-calico-aio:
stage: deploy-part1
Expand All @@ -35,7 +45,7 @@ packet_ubuntu20-calico-aio:

# ### PR JOBS PART2

packet_centos7-flannel-containerd-addons-ha:
packet_centos7-flannel-addons-ha:
extends: .packet_pr
stage: deploy-part2
when: on_success
Expand All @@ -51,7 +61,7 @@ packet_ubuntu18-crio:
stage: deploy-part2
when: manual

packet_ubuntu16-canal-kubeadm-ha:
packet_ubuntu16-canal-ha:
stage: deploy-part2
extends: .packet_periodic
when: on_success
Expand Down Expand Up @@ -81,7 +91,12 @@ packet_debian10-cilium-svc-proxy:
extends: .packet_periodic
when: on_success

packet_debian10-containerd:
packet_debian10-aio:
stage: deploy-part2
extends: .packet_pr
when: on_success

packet_debian10-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success
Expand All @@ -91,15 +106,15 @@ packet_debian11-calico:
extends: .packet_pr
when: on_success

packet_debian11-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success

packet_centos7-calico-ha-once-localhost:
stage: deploy-part2
extends: .packet_pr
when: on_success
variables:
# This will instruct Docker not to start over TLS.
DOCKER_TLS_CERTDIR: ""
services:
- docker:19.03.9-dind

packet_centos8-kube-ovn:
stage: deploy-part2
Expand All @@ -111,6 +126,11 @@ packet_centos8-calico:
extends: .packet_pr
when: on_success

packet_centos8-docker:
stage: deploy-part2
extends: .packet_pr
when: on_success

packet_fedora34-weave:
stage: deploy-part2
extends: .packet_pr
Expand Down Expand Up @@ -138,12 +158,12 @@ packet_ubuntu18-cilium-sep:
extends: .packet_pr
when: manual

packet_ubuntu18-flannel-containerd-ha:
packet_ubuntu18-flannel-ha:
stage: deploy-part2
extends: .packet_pr
when: manual

packet_ubuntu18-flannel-containerd-ha-once:
packet_ubuntu18-flannel-ha-once:
stage: deploy-part2
extends: .packet_pr
when: manual
Expand Down Expand Up @@ -199,7 +219,7 @@ packet_centos8-calico-nodelocaldns-secondary:
extends: .packet_pr
when: manual

packet_fedora34-kube-ovn-containerd:
packet_fedora34-kube-ovn:
stage: deploy-part2
extends: .packet_periodic
when: on_success
Expand Down
22 changes: 11 additions & 11 deletions docs/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

To generate this Matrix run `./tests/scripts/md-table/main.py`

## docker
## containerd

| OS / CNI | calico | canal | cilium | flannel | kube-ovn | kube-router | macvlan | ovn4nfv | weave |
|---| --- | --- | --- | --- | --- | --- | --- | --- | --- |
amazon | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
centos7 | :white_check_mark: | :x: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: | :white_check_mark: |
centos7 | :white_check_mark: | :x: | :x: | :white_check_mark: | :x: | :white_check_mark: | :x: | :x: | :white_check_mark: |
centos8 | :white_check_mark: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: | :x: | :x: |
debian10 | :x: | :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
debian10 | :white_check_mark: | :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: |
debian11 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
debian9 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: |
fedora33 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
fedora34 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: |
fedora34 | :white_check_mark: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: | :x: | :white_check_mark: |
opensuse | :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
oracle7 | :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu16 | :x: | :white_check_mark: | :x: | :white_check_mark: | :x: | :white_check_mark: | :x: | :x: | :white_check_mark: |
Expand All @@ -38,20 +38,20 @@ ubuntu16 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu18 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu20 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |

## containerd
## docker

| OS / CNI | calico | canal | cilium | flannel | kube-ovn | kube-router | macvlan | ovn4nfv | weave |
|---| --- | --- | --- | --- | --- | --- | --- | --- | --- |
amazon | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
centos7 | :x: | :x: | :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
centos8 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
centos7 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
centos8 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
debian10 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
debian11 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
debian11 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
debian9 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
fedora33 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
fedora34 | :x: | :x: | :x: | :x: | :white_check_mark: | :x: | :x: | :x: | :x: |
fedora34 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
opensuse | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
oracle7 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu16 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu18 | :x: | :x: | :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
ubuntu20 | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu18 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
ubuntu20 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
3 changes: 2 additions & 1 deletion inventory/sample/group_vars/k8s_cluster/k8s-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ dns_domain: "{{ cluster_name }}"

## Container runtime
## docker for docker, crio for cri-o and containerd for containerd.
container_manager: docker
## Default: containerd
container_manager: containerd

# Additional container runtimes
kata_containers_enabled: false
Expand Down
2 changes: 1 addition & 1 deletion roles/kubespray-defaults/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ kubelet_shutdown_grace_period_critical_pods: 20s
deploy_container_engine: inventory_hostname in groups['k8s_cluster'] or etcd_deployment_type != 'host'

# Container for runtime
container_manager: docker
container_manager: containerd

# Enable Kata Containers as additional container runtime
# When enabled, it requires `container_manager` different than Docker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ download_run_once: true
helm_enabled: true
krew_enabled: true
kubernetes_audit: true
container_manager: containerd
etcd_events_cluster_enabled: true
local_volume_provisioner_enabled: true
etcd_deployment_type: host
Expand Down
15 changes: 15 additions & 0 deletions tests/files/packet_centos8-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
# Instance settings
cloud_image: centos-8
mode: default
vm_memory: 3072Mi

# Kubespray settings
deploy_netchecker: true
dns_min_replicas: 1

# required
calico_iptables_backend: "Auto"

# Use docker
container_manager: docker
14 changes: 14 additions & 0 deletions tests/files/packet_debian10-aio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
# Instance settings
cloud_image: debian-10
mode: default

# Kubespray settings
etcd_deployment_type: host
deploy_netchecker: true
dns_min_replicas: 1

helm_enabled: true
krew_enabled: true

auto_renew_certificates: true
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ cloud_image: debian-10
mode: default

# Kubespray settings
container_manager: containerd
etcd_deployment_type: host
deploy_netchecker: true
dns_min_replicas: 1

helm_enabled: true
krew_enabled: true

# https://gitlab.com/miouge/kubespray-ci/-/blob/a4fd5ed6857807f1c353cb60848aedebaf7d2c94/manifests/http-proxy.yml#L42
http_proxy: http://172.30.30.30:8888
https_proxy: http://172.30.30.30:8888

auto_renew_certificates: true

# Use docker
container_manager: docker
12 changes: 12 additions & 0 deletions tests/files/packet_debian11-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# Instance settings
cloud_image: debian-11
mode: default

# Kubespray settings
etcd_deployment_type: host
deploy_netchecker: true
dns_min_replicas: 1

# Use docker
container_manager: docker
3 changes: 0 additions & 3 deletions tests/files/packet_debian9-calico-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ mode: default
kube_network_plugin: calico
deploy_netchecker: true
dns_min_replicas: 1

# Make docker happy
docker_containerd_version: latest
3 changes: 0 additions & 3 deletions tests/files/packet_debian9-macvlan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@ kube_proxy_masquerade_all: true
macvlan_interface: "eth0"

auto_renew_certificates: true

# Make docker happy
docker_containerd_version: latest
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ cloud_image: fedora-34
mode: default

# Kubespray settings
container_manager: containerd
etcd_deployment_type: host
deploy_netchecker: true
dns_min_replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ calico_datastore: etcd
kube_network_plugin: canal
deploy_netchecker: true
dns_min_replicas: 1

# Make docker jobs happy
docker_containerd_version: latest
3 changes: 0 additions & 3 deletions tests/files/packet_ubuntu16-canal-sep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ calico_datastore: etcd
kube_network_plugin: canal
deploy_netchecker: true
dns_min_replicas: 1

# Make docker jobs happy
docker_containerd_version: latest
3 changes: 0 additions & 3 deletions tests/files/packet_ubuntu16-flannel-ha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@ kubeadm_certificate_key: 3998c58db6497dd17d909394e62d515368c06ec617710d02edea31c
skip_non_kubeadm_warning: true
deploy_netchecker: true
dns_min_replicas: 1

# Make docker jobs happy
docker_containerd_version: latest
3 changes: 0 additions & 3 deletions tests/files/packet_ubuntu16-kube-router-sep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ bootstrap_os: ubuntu
kube_network_plugin: kube-router
deploy_netchecker: true
dns_min_replicas: 1

# Make docker jobs happy
docker_containerd_version: latest
3 changes: 0 additions & 3 deletions tests/files/packet_ubuntu16-kube-router-svc-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@ deploy_netchecker: true
dns_min_replicas: 1

kube_router_run_service_proxy: true

# Make docker jobs happy
docker_containerd_version: latest
3 changes: 0 additions & 3 deletions tests/files/packet_ubuntu16-weave-sep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@ deploy_netchecker: true
dns_min_replicas: 1

auto_renew_certificates: true

# Make docker jobs happy
docker_containerd_version: latest
13 changes: 13 additions & 0 deletions tests/files/packet_ubuntu18-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# Instance settings
cloud_image: ubuntu-1804
mode: aio
vm_memory: 1600Mi

# Kubespray settings
kube_network_plugin: calico
deploy_netchecker: true
dns_min_replicas: 1

# Use docker
container_manager: docker
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ kube_network_plugin: flannel
helm_enabled: true
krew_enabled: true
kubernetes_audit: true
container_manager: containerd
etcd_events_cluster_enabled: true
local_volume_provisioner_enabled: true
etcd_deployment_type: host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ kube_network_plugin: flannel
helm_enabled: true
krew_enabled: true
kubernetes_audit: true
container_manager: containerd
etcd_events_cluster_enabled: true
local_volume_provisioner_enabled: true
etcd_deployment_type: host
Expand Down
19 changes: 19 additions & 0 deletions tests/files/packet_ubuntu20-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# Instance settings
cloud_image: ubuntu-2004
mode: aio
vm_memory: 1600Mi

# Kubespray settings
kube_network_plugin: calico
deploy_netchecker: true
dns_min_replicas: 1

# Currently ipvs not available on KVM: https://packages.ubuntu.com/search?suite=focal&arch=amd64&mode=exactfilename&searchon=contents&keywords=ip_vs_sh.ko
kube_proxy_mode: iptables
enable_nodelocaldns: False

auto_renew_certificates: true

# Use docker
container_manager: docker
3 changes: 1 addition & 2 deletions tests/scripts/md-table/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def jinja(self):
operating_systems = list(self.db.get_unique_ids("operating_system"))

container_engines.sort()
container_engines.reverse() # reverse sort container_engines to get Docker first in the list
network_plugins.sort()
operating_systems.sort()

Expand Down Expand Up @@ -88,7 +87,7 @@ def markdown(self):
for f in files:
y = yaml.load(f.open(), Loader=yaml.FullLoader)

container_manager = y.get('container_manager', 'docker')
container_manager = y.get('container_manager', 'containerd')
network_plugin = y.get('kube_network_plugin', 'calico')
x = re.match(r"^[a-z-]+_([a-z0-9]+).*", f.name)
operating_system = x.group(1)
Expand Down

0 comments on commit c3e7b63

Please sign in to comment.