From 1b74568d89e5a6dc50e852ff70266944477d0eef Mon Sep 17 00:00:00 2001 From: Bartek Grzybowski Date: Thu, 28 Jan 2021 14:34:41 +0100 Subject: Add Helm v3 test scenario to rke playbook tests Change-Id: I2d6d650110fbdc84ce7e0922239c7b219e35d5ee Issue-ID: OOM-2665 Signed-off-by: Bartek Grzybowski --- ansible/test/play-rke/molecule/default/prepare.yml | 2 + ansible/test/play-rke/molecule/helm3/molecule.yml | 53 ++++++++++++++++++++++ ansible/test/play-rke/molecule/helm3/playbook.yml | 1 + ansible/test/play-rke/molecule/helm3/prepare.yml | 1 + ansible/test/play-rke/molecule/helm3/vars.yml | 5 ++ 5 files changed, 62 insertions(+) create mode 100644 ansible/test/play-rke/molecule/helm3/molecule.yml create mode 120000 ansible/test/play-rke/molecule/helm3/playbook.yml create mode 120000 ansible/test/play-rke/molecule/helm3/prepare.yml create mode 100644 ansible/test/play-rke/molecule/helm3/vars.yml (limited to 'ansible/test') diff --git a/ansible/test/play-rke/molecule/default/prepare.yml b/ansible/test/play-rke/molecule/default/prepare.yml index 6d810052..789a9402 100644 --- a/ansible/test/play-rke/molecule/default/prepare.yml +++ b/ansible/test/play-rke/molecule/default/prepare.yml @@ -19,3 +19,5 @@ mode: infra - prepare-kubectl - prepare-helm + - role: prepare-chartmuseum + when: helm_version | regex_search("^v3" ) diff --git a/ansible/test/play-rke/molecule/helm3/molecule.yml b/ansible/test/play-rke/molecule/helm3/molecule.yml new file mode 100644 index 00000000..b2ff9b88 --- /dev/null +++ b/ansible/test/play-rke/molecule/helm3/molecule.yml @@ -0,0 +1,53 @@ +--- +dependency: + name: galaxy +driver: + name: docker +lint: + name: yamllint +platforms: + - name: infrastructure-server + image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6} + pre_build_image: true + privileged: true + override_command: false + restart_policy: unless-stopped + volumes: + - /var/lib/docker + - /var/lib/kubelet + groups: + - infrastructure + - kubernetes-etcd + - kubernetes-control-plane + - kubernetes + networks: + - name: rke + purge_networks: true + - name: kubernetes-node-1 + image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6} + pre_build_image: true + privileged: true + override_command: false + restart_policy: unless-stopped + volumes: + - /var/lib/docker + - /var/lib/kubelet + groups: + - kubernetes + - kubernetes-node + networks: + - name: rke + purge_networks: true +provisioner: + name: ansible + env: + ANSIBLE_ROLES_PATH: ../../../../test/roles + ANSIBLE_LIBRARY: ../../../../library + lint: + name: ansible-lint +scenario: + name: helm3 +verifier: + name: testinfra + lint: + name: flake8 diff --git a/ansible/test/play-rke/molecule/helm3/playbook.yml b/ansible/test/play-rke/molecule/helm3/playbook.yml new file mode 120000 index 00000000..a3e26797 --- /dev/null +++ b/ansible/test/play-rke/molecule/helm3/playbook.yml @@ -0,0 +1 @@ +../default/playbook.yml \ No newline at end of file diff --git a/ansible/test/play-rke/molecule/helm3/prepare.yml b/ansible/test/play-rke/molecule/helm3/prepare.yml new file mode 120000 index 00000000..1c017d9a --- /dev/null +++ b/ansible/test/play-rke/molecule/helm3/prepare.yml @@ -0,0 +1 @@ +../default/prepare.yml \ No newline at end of file diff --git a/ansible/test/play-rke/molecule/helm3/vars.yml b/ansible/test/play-rke/molecule/helm3/vars.yml new file mode 100644 index 00000000..e16e502f --- /dev/null +++ b/ansible/test/play-rke/molecule/helm3/vars.yml @@ -0,0 +1,5 @@ +--- +app_name: moleculeapp +app_data_path: "/opt/{{ app_name }}" +cluster_config_dir: "/opt/{{ app_name }}/cluster" +helm_version: v3.3.4 -- cgit 1.2.3-korg