From fca1f8f24b67dffd02126346c0bb3fab2d8d4b8a Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Tue, 15 Feb 2022 16:02:17 +0100 Subject: [PATCH] kubeadm/cilium: add IPSec encryption test we add a test case to cover cilium IPSec installation. Previous cilium deployment is deleted and a new one is done with `--encryption=ipsec` param. Signed-off-by: Mathieu Tortuyaux --- kola/tests/kubeadm/kubeadm.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/kola/tests/kubeadm/kubeadm.go b/kola/tests/kubeadm/kubeadm.go index fa6e86563..cd97d7eb4 100644 --- a/kola/tests/kubeadm/kubeadm.go +++ b/kola/tests/kubeadm/kubeadm.go @@ -45,7 +45,20 @@ type extraTest struct { var ( // extraTests can be used to extend the common tests for a given supported CNI. - extraTests = map[string][]extraTest{} + extraTests = map[string][]extraTest{ + "cilium": []extraTest{ + extraTest{ + name: "IPSec encryption", + runFunc: func(controller platform.Machine, params map[string]interface{}, c cluster.TestCluster) { + _ = c.MustSSH(controller, "/opt/bin/cilium uninstall") + version := params["CiliumVersion"].(string) + cidr := params["PodSubnet"].(string) + cmd := fmt.Sprintf("/opt/bin/cilium install --config enable-endpoint-routes=true --config cluster-pool-ipv4-cidr=%s --version=%s --encryption=ipsec --wait --wait-duration 1m", cidr, version) + _ = c.MustSSH(controller, cmd) + }, + }, + }, + } // CNIs is the list of CNIs to deploy // in the cluster setup