diff --git a/inttest/kubectl/kubectl_test.go b/inttest/kubectl/kubectl_test.go index a824d046c312..c1de11017275 100644 --- a/inttest/kubectl/kubectl_test.go +++ b/inttest/kubectl/kubectl_test.go @@ -211,8 +211,12 @@ func checkClientVersion(t *testing.T, v map[string]any) { } func checkServerVersion(t *testing.T, v map[string]any) { + expectedVersion := constant.KubernetesMajorMinorVersion + if constant.KubernetesPreRelease { + expectedVersion += "+" + } assert.Equal(t, - constant.KubernetesMajorMinorVersion, + expectedVersion, fmt.Sprintf("%v.%v", requiredValue[string](t, v, "major"), requiredValue[string](t, v, "minor")), ) assert.Contains(t, diff --git a/pkg/constant/constant.go b/pkg/constant/constant.go index 5e6df60e0c95..c176d58f29e1 100644 --- a/pkg/constant/constant.go +++ b/pkg/constant/constant.go @@ -72,6 +72,8 @@ const ( // KubernetesMajorMinorVersion defines the current embedded major.minor version info KubernetesMajorMinorVersion = "1.29" + // Indicates if k0s is using a Kubernetes pre-release or a GA version. + KubernetesPreRelease = false /* Image Constants */