diff --git a/go.mod b/go.mod index f14de649ee60..536ed5958e34 100644 --- a/go.mod +++ b/go.mod @@ -47,7 +47,7 @@ require ( github.com/stretchr/testify v1.8.4 github.com/urfave/cli v1.22.14 github.com/vishvananda/netlink v1.2.1-beta.2 - github.com/vmware-tanzu/sonobuoy v0.56.17 + github.com/vmware-tanzu/sonobuoy v0.57.0 github.com/weaveworks/footloose v0.0.0-20210208164054-2862489574a3 github.com/zcalusic/sysinfo v1.0.1 go.etcd.io/etcd/api/v3 v3.5.9 diff --git a/go.sum b/go.sum index 678b34f9e00e..03165dc4a4b8 100644 --- a/go.sum +++ b/go.sum @@ -826,8 +826,8 @@ github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhg github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8= github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= -github.com/vmware-tanzu/sonobuoy v0.56.17 h1:X30OozdtWOkvMCOZLb1b/QSeKEBx634py8ArTw8RcFU= -github.com/vmware-tanzu/sonobuoy v0.56.17/go.mod h1:EZay4jbB9SKlkG/ywbmtoe8rWzd0w1eCxuk+tHbBQbM= +github.com/vmware-tanzu/sonobuoy v0.57.0 h1:EhxamEAo9G5PQae0kW9CTmRJ9FQ11Mb8uxBlYvL6EDU= +github.com/vmware-tanzu/sonobuoy v0.57.0/go.mod h1:uHypnxX++i0te9/2AqtMvSqlKt5iLK3b8Ss8wA2YFHQ= github.com/weppos/publicsuffix-go v0.13.1-0.20210123135404-5fd73613514e/go.mod h1:HYux0V0Zi04bHNwOHy4cXJVz/TQjYonnF6aoYhj+3QE= github.com/weppos/publicsuffix-go v0.15.1-0.20210511084619-b1f36a2d6c0b h1:FsyNrX12e5BkplJq7wKOLk0+C6LZ+KGXvuEcKUYm5ss= github.com/weppos/publicsuffix-go v0.15.1-0.20210511084619-b1f36a2d6c0b/go.mod h1:HYux0V0Zi04bHNwOHy4cXJVz/TQjYonnF6aoYhj+3QE= diff --git a/inttest/Makefile b/inttest/Makefile index c4377c6e246c..4d1d551e166d 100644 --- a/inttest/Makefile +++ b/inttest/Makefile @@ -1,10 +1,8 @@ - ARCH := $(shell go env GOARCH) OS := $(shell go env GOOS) K0S_UPDATE_TO_VERSION ?= $(shell ../k0s version) -SONOBUOY_VERSION ?= 0.56.17 -sonobuoy_url = https://github.com/vmware-tanzu/sonobuoy/releases/download/v${SONOBUOY_VERSION}/sonobuoy_${SONOBUOY_VERSION}_$(OS)_$(ARCH).tar.gz +sonobuoy_url = https://github.com/vmware-tanzu/sonobuoy/releases/download/v${sonobuoy_version}/sonobuoy_${sonobuoy_version}_$(OS)_$(ARCH).tar.gz curl = curl -L --silent diff --git a/inttest/Makefile.variables b/inttest/Makefile.variables index 718db5974e41..91f870281caf 100644 --- a/inttest/Makefile.variables +++ b/inttest/Makefile.variables @@ -1,3 +1,4 @@ +sonobuoy_version := 0.57.0 smoketests := \ check-addons \ check-airgap \ diff --git a/inttest/toolsuite/operations/sonobuoy.go b/inttest/toolsuite/operations/sonobuoy.go index ae0c64784be8..94899366e6ba 100644 --- a/inttest/toolsuite/operations/sonobuoy.go +++ b/inttest/toolsuite/operations/sonobuoy.go @@ -28,12 +28,12 @@ import ( ) const ( - sonobuoyVersion = "0.56.11" - sonobuoyOs = "linux" - sonobuoyArch = "amd64" + sonobuoyOs = "linux" + sonobuoyArch = "amd64" ) type SonobuoyConfig struct { + Version string Parameters []string } @@ -41,7 +41,7 @@ type SonobuoyConfig struct { // using the clusters k0s.kubeconfig. Results are stored in the data directory as `results.tar.gz` func SonobuoyOperation(config SonobuoyConfig) ts.ClusterOperation { return func(ctx context.Context, data ts.ClusterData) error { - sonobuoyBinary, cleanup, err := downloadSonobuoy(ctx, sonobuoyVersion, sonobuoyOs, sonobuoyArch) + sonobuoyBinary, cleanup, err := downloadSonobuoy(ctx, config.Version, sonobuoyOs, sonobuoyArch) defer cleanup() if err != nil { diff --git a/inttest/toolsuite/tests/conformance_test.go b/inttest/toolsuite/tests/conformance_test.go index 48d895c0396b..36d6d0b7dd32 100644 --- a/inttest/toolsuite/tests/conformance_test.go +++ b/inttest/toolsuite/tests/conformance_test.go @@ -28,6 +28,7 @@ import ( ) type ConformanceConfig struct { + SonobuoyVersion string KubernetesVersion string } @@ -38,11 +39,15 @@ type ConformanceSuite struct { var config ConformanceConfig func init() { + flag.StringVar(&config.SonobuoyVersion, "sonobuoy-version", "", "The sonobuoy version to use") flag.StringVar(&config.KubernetesVersion, "conformance-kubernetes-version", "", "The kubernetes version of the conformance tests to run") } // TestConformanceSuite runs the Sonobuoy conformance tests for a specific k8s version. func TestConformanceSuite(t *testing.T) { + if config.SonobuoyVersion == "" { + t.Fatal("--sonobuoy-version is a required parameter") + } if config.KubernetesVersion == "" { t.Fatal("--conformance-kubernetes-version is a required parameter") } @@ -51,6 +56,7 @@ func TestConformanceSuite(t *testing.T) { ts.ToolSuite{ Operation: tsops.SonobuoyOperation( tsops.SonobuoyConfig{ + Version: config.SonobuoyVersion, Parameters: []string{ "--mode=certified-conformance", "--plugin-env=e2e.E2E_EXTRA_ARGS=\"--ginkgo.v\"",