From adfd77f11d916e4b9a2981e4022250dae929b126 Mon Sep 17 00:00:00 2001
From: Kay Yan <yankay@users.noreply.github.com>
Date: Tue, 5 Jul 2022 22:58:47 +0800
Subject: [PATCH] add-test-for-kubeadm-etcd-deployment (#9007)

---
 .gitlab-ci/packet.yml                                 |  5 +++++
 ...packet_ubuntu20-calico-etcd-kubeadm-upgrade-ha.yml |  4 ++--
 tests/files/packet_ubuntu20-calico-etcd-kubeadm.yml   | 11 +++++++++++
 3 files changed, 18 insertions(+), 2 deletions(-)
 create mode 100644 tests/files/packet_ubuntu20-calico-etcd-kubeadm.yml

diff --git a/.gitlab-ci/packet.yml b/.gitlab-ci/packet.yml
index e5247ce0f..57a7f0b31 100644
--- a/.gitlab-ci/packet.yml
+++ b/.gitlab-ci/packet.yml
@@ -289,6 +289,11 @@ packet_almalinux8-calico-remove-node:
     REMOVE_NODE_CHECK: "true"
     REMOVE_NODE_NAME: "instance-3"
 
+packet_ubuntu20-calico-etcd-kubeadm:
+  stage: deploy-part3
+  extends: .packet_pr
+  when: on_success
+
 packet_debian11-calico-upgrade-once:
   stage: deploy-part3
   extends: .packet_periodic
diff --git a/tests/files/packet_ubuntu20-calico-etcd-kubeadm-upgrade-ha.yml b/tests/files/packet_ubuntu20-calico-etcd-kubeadm-upgrade-ha.yml
index 3eda9034b..f9cd3a088 100644
--- a/tests/files/packet_ubuntu20-calico-etcd-kubeadm-upgrade-ha.yml
+++ b/tests/files/packet_ubuntu20-calico-etcd-kubeadm-upgrade-ha.yml
@@ -3,8 +3,8 @@
 cloud_image: ubuntu-2004
 mode: ha
 
-# use the legacy setting to test the upgrade
-etcd_kubeadm_enabled: true
+# use the kubeadm etcd setting to test the upgrade
+etcd_deployment_type: kubeadm
 
 upgrade_cluster_setup: true
 
diff --git a/tests/files/packet_ubuntu20-calico-etcd-kubeadm.yml b/tests/files/packet_ubuntu20-calico-etcd-kubeadm.yml
new file mode 100644
index 000000000..99f736544
--- /dev/null
+++ b/tests/files/packet_ubuntu20-calico-etcd-kubeadm.yml
@@ -0,0 +1,11 @@
+---
+# Instance settings
+cloud_image: ubuntu-2004
+mode: default
+
+# use the kubeadm etcd setting to test the upgrade
+etcd_deployment_type: kubeadm
+
+# 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
-- 
GitLab