From 589823bdc142fb397e6ff455b357c1def208c9c3 Mon Sep 17 00:00:00 2001 From: Calin Cristian Andrei Date: Mon, 6 Jun 2022 18:23:08 +0300 Subject: [PATCH] [CI] remove docker stand-alone molecule test --- .gitlab-ci/molecule.yml | 9 +---- .../docker/molecule/default/converge.yml | 7 ---- .../docker/molecule/default/molecule.yml | 33 ------------------- .../docker/molecule/default/prepare.yml | 6 ---- .../molecule/default/tests/test_default.py | 19 ----------- .../node/templates/kubelet.env.v1beta1.j2 | 1 - 6 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 roles/container-engine/docker/molecule/default/converge.yml delete mode 100644 roles/container-engine/docker/molecule/default/molecule.yml delete mode 100644 roles/container-engine/docker/molecule/default/prepare.yml delete mode 100644 roles/container-engine/docker/molecule/default/tests/test_default.py diff --git a/.gitlab-ci/molecule.yml b/.gitlab-ci/molecule.yml index 5f8e02e4c..346bf18ce 100644 --- a/.gitlab-ci/molecule.yml +++ b/.gitlab-ci/molecule.yml @@ -44,7 +44,7 @@ molecule_no_container_engines: molecule_docker: extends: .molecule script: - - ./tests/scripts/molecule_run.sh -i container-engine/docker + - ./tests/scripts/molecule_run.sh -i container-engine/cri-dockerd when: on_success molecule_containerd: @@ -60,13 +60,6 @@ molecule_cri-o: - ./tests/scripts/molecule_run.sh -i container-engine/cri-o when: on_success -molecule_cri-dockerd: - extends: .molecule - stage: deploy-part2 - script: - - ./tests/scripts/molecule_run.sh -i container-engine/cri-dockerd - when: on_success - # Stage 3 container engines don't get as much attention so allow them to fail molecule_kata: extends: .molecule diff --git a/roles/container-engine/docker/molecule/default/converge.yml b/roles/container-engine/docker/molecule/default/converge.yml deleted file mode 100644 index afe7a8eb3..000000000 --- a/roles/container-engine/docker/molecule/default/converge.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Converge - hosts: all - become: true - roles: - - role: kubespray-defaults - - role: container-engine/docker diff --git a/roles/container-engine/docker/molecule/default/molecule.yml b/roles/container-engine/docker/molecule/default/molecule.yml deleted file mode 100644 index c2c71cad2..000000000 --- a/roles/container-engine/docker/molecule/default/molecule.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -driver: - name: vagrant - provider: - name: libvirt -lint: | - set -e - yamllint -c ../../../.yamllint . -platforms: - - name: ubuntu18 - box: generic/ubuntu1804 - cpus: 2 - memory: 1024 - - name: almalinux8 - box: almalinux/8 - cpus: 2 - memory: 1024 -provisioner: - name: ansible - env: - ANSIBLE_ROLES_PATH: ../../../../ - config_options: - defaults: - callbacks_enabled: profile_tasks - timeout: 120 - lint: - name: ansible-lint - options: - c: ../../../.ansible-lint -verifier: - name: testinfra - lint: - name: flake8 diff --git a/roles/container-engine/docker/molecule/default/prepare.yml b/roles/container-engine/docker/molecule/default/prepare.yml deleted file mode 100644 index 1afc51a04..000000000 --- a/roles/container-engine/docker/molecule/default/prepare.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- name: Prepare - hosts: all - gather_facts: False - roles: - - role: bootstrap-os diff --git a/roles/container-engine/docker/molecule/default/tests/test_default.py b/roles/container-engine/docker/molecule/default/tests/test_default.py deleted file mode 100644 index 5cc0627b9..000000000 --- a/roles/container-engine/docker/molecule/default/tests/test_default.py +++ /dev/null @@ -1,19 +0,0 @@ -import os - -import testinfra.utils.ansible_runner - -testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( - os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') - - -def test_docker_service(host): - docker = host.service("docker") - assert docker.is_running - assert docker.is_enabled - - -def test_docker_run(host): - with host.sudo(): - cmd = host.command("docker run quay.io/kubespray/hello-world:latest") - assert cmd.rc == 0 - assert "Hello from Docker" in cmd.stdout diff --git a/roles/kubernetes/node/templates/kubelet.env.v1beta1.j2 b/roles/kubernetes/node/templates/kubelet.env.v1beta1.j2 index 6029df529..5c8c32df6 100644 --- a/roles/kubernetes/node/templates/kubelet.env.v1beta1.j2 +++ b/roles/kubernetes/node/templates/kubelet.env.v1beta1.j2 @@ -14,7 +14,6 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}" {# end kubeadm specific settings #} --container-runtime=remote \ --container-runtime-endpoint=unix://{{ cri_socket }} \ -{% endif %} --runtime-cgroups={{ kubelet_runtime_cgroups }} \ {% endset %}