diff --git a/inttest/basic/basic_test.go b/inttest/basic/basic_test.go index e040fe125385..13314def6439 100644 --- a/inttest/basic/basic_test.go +++ b/inttest/basic/basic_test.go @@ -31,6 +31,7 @@ import ( certificatesv1 "k8s.io/api/certificates/v1" corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" @@ -75,6 +76,8 @@ func (s *BasicSuite) TestK0sGetsUp() { if err != nil { s.FailNow("failed to obtain Kubernetes client", err) } + restConfig, err := s.GetKubeConfig(s.ControllerNode(0), "") + s.Require().NoError(err) err = s.WaitForNodeReady(s.WorkerNode(0), kc) s.NoError(err) @@ -113,6 +116,20 @@ func (s *BasicSuite) TestK0sGetsUp() { s.Require().NoError(common.VerifyKubeletMetrics(ctx, kc, node)) } + s.T().Log("checking kube-router gobgp functionality") + kubeRouterPods, err := kc.CoreV1().Pods("kube-system").List(ctx, metav1.ListOptions{LabelSelector: "k8s-app=kube-router"}) + s.Require().NoError(err) + // Just take the first running pod for execing the gobgp command + for _, pod := range kubeRouterPods.Items { + if pod.Status.Phase == corev1.PodRunning { + out, err := common.PodExecCmdOutput(kc, restConfig, pod.Name, "kube-system", "gobgp global") + s.Require().NoError(err) + // Check that the output contains the default AS number, that's a sign that gobgp is working + s.Assert().Regexp(`AS:\s+64512`, out) + break + } + } + s.verifyContainerdDefaultConfig(ctx) s.Require().NoError(s.probeCoreDNSAntiAffinity(ctx, kc)) diff --git a/pkg/constant/constant_shared.go b/pkg/constant/constant_shared.go index adfcd196b05e..08b866600753 100644 --- a/pkg/constant/constant_shared.go +++ b/pkg/constant/constant_shared.go @@ -88,7 +88,7 @@ const ( CalicoNodeImage = "quay.io/k0sproject/calico-node" KubeControllerImage = "quay.io/k0sproject/calico-kube-controllers" KubeRouterCNIImage = "quay.io/k0sproject/kube-router" - KubeRouterCNIImageVersion = "v1.6.0-iptables1.8.9-0" + KubeRouterCNIImageVersion = "v1.6.0-iptables1.8.9-1" KubeRouterCNIInstallerImage = "quay.io/k0sproject/cni-node" KubeRouterCNIInstallerImageVersion = "1.1.1-k0s.1" OpenEBSRepository = "https://openebs.github.io/charts"