From b6bd71e1073b4cd5bc395a9ed40b536c088a0611 Mon Sep 17 00:00:00 2001 From: Vincent Ni Date: Wed, 17 May 2023 13:41:25 -0700 Subject: [PATCH] Support new kubeversion for curated package e2e tests (#5872) * refactor emissary test * refactor emissary test * refactor simple flow test * refactor harbor test * refactor cert manager test * refactor metallb test * refactor adot test * refactor auto scaler test * refactor prometheus test * refactor package disable test * increase timeout * update default case --- test/e2e/cloudstack_test.go | 13 + test/e2e/docker_test.go | 172 +++++----- test/e2e/metallb.go | 17 +- test/e2e/nutanix_test.go | 305 ++++++----------- test/e2e/tinkerbell_test.go | 203 +++++++++--- test/e2e/vsphere_test.go | 645 ++++++++++++++---------------------- test/framework/cluster.go | 38 +-- 7 files changed, 619 insertions(+), 774 deletions(-) diff --git a/test/e2e/cloudstack_test.go b/test/e2e/cloudstack_test.go index 66dfbb30e337..6aeac84fb0cc 100644 --- a/test/e2e/cloudstack_test.go +++ b/test/e2e/cloudstack_test.go @@ -70,6 +70,19 @@ func TestCloudStackKubernetes123RedhatCuratedPackagesEmissarySimpleFlow(t *testi runCuratedPackageEmissaryInstallSimpleFlow(test) } +func TestCloudStackKubernetes123RedhatCuratedPackagesHarborSimpleFlow(t *testing.T) { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest( + t, + framework.NewCloudStack(t, framework.WithCloudStackRedhat123()), + framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)), + framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube123), + "my-packages-test", EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageHarborInstallSimpleFlowLocalStorageProvisioner(test) +} + func TestCloudStackKubernetes123RedhatWorkloadClusterCuratedPackagesSimpleFlow(t *testing.T) { framework.CheckCuratedPackagesCredentials(t) provider := framework.NewCloudStack(t, framework.WithCloudStackRedhat123()) diff --git a/test/e2e/docker_test.go b/test/e2e/docker_test.go index c02788ff616e..b8ad596e69fd 100644 --- a/test/e2e/docker_test.go +++ b/test/e2e/docker_test.go @@ -5,9 +5,10 @@ package e2e import ( - corev1 "k8s.io/api/core/v1" "testing" + corev1 "k8s.io/api/core/v1" + "github.com/aws/eks-anywhere/internal/pkg/api" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/constants" @@ -116,97 +117,88 @@ func TestDockerInstallGithubFluxDuringUpgrade(t *testing.T) { } // Curated packages -func TestDockerKubernetes124CuratedPackagesPrometheusSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, framework.NewDocker(t), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube124)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube124), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackagesPrometheusInstallSimpleFlow(test) -} - -func TestDockerKubernetesCuratedPackagesHarborSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, framework.NewDocker(t), - framework.WithPackageConfig(t, EksaPackageBundleURI, - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageHarborInstallSimpleFlowLocalStorageProvisioner(test) -} - -func TestDockerKubernetes125CuratedPackagesEmissarySimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewDocker(t), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageEmissaryInstallSimpleFlow(test) -} - -func TestDockerKubernetes125CuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewDocker(t), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallSimpleFlow(test) +func TestDockerCuratedPackagesSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewDocker(t), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageInstallSimpleFlow(test) + } +} + +func TestDockerCuratedPackagesEmissarySimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewDocker(t), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageEmissaryInstallSimpleFlow(test) + } +} + +func TestDockerCuratedPackagesHarborSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewDocker(t), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageHarborInstallSimpleFlowLocalStorageProvisioner(test) + } +} + +func TestDockerCuratedPackagesAdotSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, framework.NewDocker(t), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackagesAdotInstallSimpleFlow(test) // other args as necessary + } +} + +func TestDockerCuratedPackagesPrometheusSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, framework.NewDocker(t), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackagesPrometheusInstallSimpleFlow(test) + } +} + +func TestDockerCuratedPackagesDisabled(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, framework.NewDocker(t), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, + &v1alpha1.PackageConfiguration{Disable: true}), + ) + runDisabledCuratedPackageInstallSimpleFlow(test) // other args as necessary + } } -func TestDockerKubernetes126CuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewDocker(t), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube126), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallSimpleFlow(test) -} - -func TestDockerKubernetes127CuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewDocker(t), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube127)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube127), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallSimpleFlow(test) -} - -func TestDockerKubernetes124CuratedPackagesAdotSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, framework.NewDocker(t), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube124)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube124), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackagesAdotInstallSimpleFlow(test) // other args as necessary -} - -func TestDockerKubernetesCuratedPackagesDisabled(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, framework.NewDocker(t), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, - &v1alpha1.PackageConfiguration{Disable: true}), - ) - runDisabledCuratedPackageInstallSimpleFlow(test) // other args as necessary -} func TestDockerCuratedPackagesMetalLB(t *testing.T) { RunMetalLBDockerTests(t) } diff --git a/test/e2e/metallb.go b/test/e2e/metallb.go index 926d36c179f1..4abbe0539eb4 100644 --- a/test/e2e/metallb.go +++ b/test/e2e/metallb.go @@ -14,7 +14,6 @@ import ( "github.com/stretchr/testify/suite" - "github.com/aws/eks-anywhere/internal/pkg/api" "github.com/aws/eks-anywhere/pkg/api/v1alpha1" "github.com/aws/eks-anywhere/pkg/clients/kubernetes" "github.com/aws/eks-anywhere/pkg/kubeconfig" @@ -28,10 +27,8 @@ type MetalLBSuite struct { provider framework.Provider } -var versionsToTest = []v1alpha1.KubernetesVersion{v1alpha1.Kube124, v1alpha1.Kube125} - func RunMetalLBDockerTests(t *testing.T) { - for _, v := range versionsToTest { + for _, v := range KubeVersions { s := new(MetalLBSuite) s.provider = framework.NewDocker(t) s.kubernetesVersion = v @@ -45,18 +42,6 @@ func kubeVersionNameDiscriminator(version v1alpha1.KubernetesVersion) framework. } } -func (suite *MetalLBSuite) SetupSuite() { - t := suite.T() - suite.cluster = framework.NewClusterE2ETest(t, - suite.provider, - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube123), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - kubeVersionNameDiscriminator(suite.kubernetesVersion), - ) -} - func getIPAddressPoolSpec(addresses []string, autoAssign bool) string { aList, _ := json.Marshal(addresses) return fmt.Sprintf(`{"addresses":%s,"autoAssign":%s,"avoidBuggyIPs":false}`, aList, strconv.FormatBool(autoAssign)) diff --git a/test/e2e/nutanix_test.go b/test/e2e/nutanix_test.go index c08e945dfd26..2d8a68d34fc9 100644 --- a/test/e2e/nutanix_test.go +++ b/test/e2e/nutanix_test.go @@ -5,6 +5,7 @@ package e2e import ( + "fmt" "testing" "github.com/aws/eks-anywhere/internal/pkg/api" @@ -14,214 +15,106 @@ import ( ) // Curated packages -func TestNutanixKubernetes123CuratedPackagesSimpleFlow(t *testing.T) { - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu123Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube123), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallSimpleFlow(test) -} - -func TestNutanixKubernetes124CuratedPackagesSimpleFlow(t *testing.T) { - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu124Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube124)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube124), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallSimpleFlow(test) -} - -func TestNutanixKubernetes125CuratedPackagesSimpleFlow(t *testing.T) { - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu125Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallSimpleFlow(test) -} - -func TestNutanixKubernetes126CuratedPackagesSimpleFlow(t *testing.T) { - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu126Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube126), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallSimpleFlow(test) -} - -func TestNutanixKubernetes127CuratedPackagesSimpleFlow(t *testing.T) { - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu127Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube127)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube127), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - framework.WithEnvVar(features.K8s127SupportEnvVar, "true"), - ) - runCuratedPackageInstallSimpleFlow(test) -} - -func TestNutanixKubernetes123CuratedPackagesHarborSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu123Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube123), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageHarborInstallSimpleFlowLocalStorageProvisioner(test) -} - -func TestNutanixKubernetes123CuratedPackagesEmissarySimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu123Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube123), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageEmissaryInstallSimpleFlow(test) -} - -func TestNutanixKubernetes124CuratedPackagesEmissarySimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu124Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube124)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube124), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageEmissaryInstallSimpleFlow(test) -} - -func TestNutanixKubernetes125CuratedPackagesEmissarySimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu125Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageEmissaryInstallSimpleFlow(test) -} - -func TestNutanixKubernetes126CuratedPackagesEmissarySimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu126Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube126), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageEmissaryInstallSimpleFlow(test) -} - -func TestNutanixKubernetes127CuratedPackagesEmissarySimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu127Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube127)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube127), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - framework.WithEnvVar(features.K8s127SupportEnvVar, "true"), - ) - runCuratedPackageEmissaryInstallSimpleFlow(test) -} - -func TestNutanixKubernetes125UbuntuCuratedPackagesAdotUpdateFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu125Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackagesAdotInstallUpdateFlow(test) -} - -func TestNutanixKubernetes125CuratedPackagesPrometheusSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu125Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackagesPrometheusInstallSimpleFlow(test) -} - -func TestNutanixKubernetes124CuratedPackagesClusterAutoscalerUbuntuSimpleFlow(t *testing.T) { - minNodes := 1 - maxNodes := 2 - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu124Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube124), api.WithWorkerNodeAutoScalingConfig(minNodes, maxNodes)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube124), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runAutoscalerWithMetricsServerSimpleFlow(test) -} - -func TestNutanixKubernetes125CuratedPackagesClusterAutoscalerUbuntuSimpleFlow(t *testing.T) { - minNodes := 1 - maxNodes := 2 - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu125Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125), api.WithWorkerNodeAutoScalingConfig(minNodes, maxNodes)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runAutoscalerWithMetricsServerSimpleFlow(test) -} - -func TestNutanixKubernetes126CuratedPackagesClusterAutoscalerUbuntuSimpleFlow(t *testing.T) { +func kubeVersionNutanixOpt(version v1alpha1.KubernetesVersion) framework.NutanixOpt { + switch version { + case v1alpha1.Kube123: + return framework.WithUbuntu123Nutanix() + case v1alpha1.Kube124: + return framework.WithUbuntu124Nutanix() + case v1alpha1.Kube125: + return framework.WithUbuntu125Nutanix() + case v1alpha1.Kube126: + return framework.WithUbuntu126Nutanix() + case v1alpha1.Kube127: + return framework.WithUbuntu127Nutanix() + default: + panic(fmt.Sprintf("unsupported version: %v", version)) + } +} + +func TestNutanixCuratedPackagesSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + test := framework.NewClusterE2ETest(t, + framework.NewNutanix(t, kubeVersionNutanixOpt(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageInstallSimpleFlow(test) + } +} + +func TestNutanixCuratedPackagesEmissarySimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewNutanix(t, kubeVersionNutanixOpt(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageEmissaryInstallSimpleFlow(test) + } +} + +func TestNutanixCuratedPackagesHarborSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewNutanix(t, kubeVersionNutanixOpt(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageHarborInstallSimpleFlowLocalStorageProvisioner(test) + } +} + +func TestNutanixCuratedPackagesAdotUpdateFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewNutanix(t, kubeVersionNutanixOpt(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackagesAdotInstallUpdateFlow(test) + } +} + +func TestNutanixCuratedPackagesClusterAutoscalerSimpleFlow(t *testing.T) { minNodes := 1 maxNodes := 2 - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu126Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126), api.WithWorkerNodeAutoScalingConfig(minNodes, maxNodes)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube126), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runAutoscalerWithMetricsServerSimpleFlow(test) -} - -func TestNutanixKubernetes127CuratedPackagesClusterAutoscalerUbuntuSimpleFlow(t *testing.T) { - minNodes := 1 - maxNodes := 2 - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewNutanix(t, framework.WithUbuntu127Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube127), api.WithWorkerNodeAutoScalingConfig(minNodes, maxNodes)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube127), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - framework.WithEnvVar(features.K8s127SupportEnvVar, "true"), - ) - runAutoscalerWithMetricsServerSimpleFlow(test) + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewNutanix(t, kubeVersionNutanixOpt(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version), api.WithWorkerNodeAutoScalingConfig(minNodes, maxNodes)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runAutoscalerWithMetricsServerSimpleFlow(test) + } +} + +func TestNutanixCuratedPackagesPrometheusSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewNutanix(t, kubeVersionNutanixOpt(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackagesPrometheusInstallSimpleFlow(test) + } } // Simpleflow diff --git a/test/e2e/tinkerbell_test.go b/test/e2e/tinkerbell_test.go index 05822319a45b..9a5c8f7d6a3a 100644 --- a/test/e2e/tinkerbell_test.go +++ b/test/e2e/tinkerbell_test.go @@ -5,6 +5,7 @@ package e2e import ( + "fmt" "testing" corev1 "k8s.io/api/core/v1" @@ -132,66 +133,166 @@ func TestTinkerbellKubernetes125UbuntuAddWorkerNodeGroupWithAPI(t *testing.T) { } // Curated packages -func TestTinkerbellKubernetes127UbuntuSingleNodeCuratedPackagesFlow(t *testing.T) { - test := framework.NewClusterE2ETest(t, - framework.NewTinkerbell(t, framework.WithUbuntu127Tinkerbell()), - framework.WithClusterSingleNode(v1alpha1.Kube127), - framework.WithControlPlaneHardware(1), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube127), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallTinkerbellSingleNodeFlow(test) +func kubeVersionTinkerbellOpt(version v1alpha1.KubernetesVersion) framework.TinkerbellOpt { + switch version { + case v1alpha1.Kube123: + return framework.WithUbuntu123Tinkerbell() + case v1alpha1.Kube124: + return framework.WithUbuntu124Tinkerbell() + case v1alpha1.Kube125: + return framework.WithUbuntu125Tinkerbell() + case v1alpha1.Kube126: + return framework.WithUbuntu126Tinkerbell() + case v1alpha1.Kube127: + return framework.WithUbuntu127Tinkerbell() + default: + panic(fmt.Sprintf("unsupported version: %v", version)) + } } -func TestTinkerbellKubernetes127UbuntuSingleNodeCuratedPackagesEmissaryFlow(t *testing.T) { - test := framework.NewClusterE2ETest(t, - framework.NewTinkerbell(t, framework.WithUbuntu127Tinkerbell()), - framework.WithClusterSingleNode(v1alpha1.Kube127), - framework.WithControlPlaneHardware(1), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube127), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageEmissaryInstallTinkerbellSingleNodeFlow(test) +func TestTinkerbellUbuntuSingleNodeCuratedPackagesFlow(t *testing.T) { + for _, version := range KubeVersions { + test := framework.NewClusterE2ETest(t, + framework.NewTinkerbell(t, kubeVersionTinkerbellOpt(version)), + framework.WithClusterSingleNode(version), + framework.WithControlPlaneHardware(1), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageInstallTinkerbellSingleNodeFlow(test) + } } -func TestTinkerbellKubernetes127BottleRocketSingleNodeCuratedPackagesFlow(t *testing.T) { - test := framework.NewClusterE2ETest(t, - framework.NewTinkerbell(t, framework.WithBottleRocketTinkerbell()), - framework.WithClusterSingleNode(v1alpha1.Kube127), - framework.WithControlPlaneHardware(1), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube127), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) +func TestTinkerbellBottleRocketSingleNodeCuratedPackagesFlow(t *testing.T) { + for _, version := range KubeVersions { + test := framework.NewClusterE2ETest(t, + framework.NewTinkerbell(t, framework.WithBottleRocketTinkerbell()), + framework.WithClusterSingleNode(version), + framework.WithControlPlaneHardware(1), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) - runCuratedPackageInstallTinkerbellSingleNodeFlow(test) + runCuratedPackageInstallTinkerbellSingleNodeFlow(test) + } } -func TestTinkerbellKubernetes127BottleRocketSingleNodeCuratedPackagesEmissaryFlow(t *testing.T) { - test := framework.NewClusterE2ETest(t, - framework.NewTinkerbell(t, framework.WithBottleRocketTinkerbell()), - framework.WithClusterSingleNode(v1alpha1.Kube127), - framework.WithControlPlaneHardware(1), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube127), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageEmissaryInstallTinkerbellSingleNodeFlow(test) +func TestTinkerbellUbuntuSingleNodeCuratedPackagesEmissaryFlow(t *testing.T) { + for _, version := range KubeVersions { + test := framework.NewClusterE2ETest(t, + framework.NewTinkerbell(t, kubeVersionTinkerbellOpt(version)), + framework.WithClusterSingleNode(version), + framework.WithControlPlaneHardware(1), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageEmissaryInstallTinkerbellSingleNodeFlow(test) + } } -func TestTinkerbellKubernetes127UbuntuCuratedPackagesAdotSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewTinkerbell(t, framework.WithUbuntu127Tinkerbell()), - framework.WithClusterSingleNode(v1alpha1.Kube127), - framework.WithControlPlaneHardware(1), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube127), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackagesAdotInstallTinkerbellSimpleFlow(test) +func TestTinkerbellBottleRocketSingleNodeCuratedPackagesEmissaryFlow(t *testing.T) { + for _, version := range KubeVersions { + test := framework.NewClusterE2ETest(t, + framework.NewTinkerbell(t, framework.WithBottleRocketTinkerbell()), + framework.WithClusterSingleNode(version), + framework.WithControlPlaneHardware(1), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageEmissaryInstallTinkerbellSingleNodeFlow(test) + } +} + +func TestTinkerbellUbuntuSingleNodeCuratedPackagesHarborFlow(t *testing.T) { + for _, version := range KubeVersions { + test := framework.NewClusterE2ETest(t, + framework.NewTinkerbell(t, kubeVersionTinkerbellOpt(version)), + framework.WithClusterSingleNode(version), + framework.WithControlPlaneHardware(1), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageHarborInstallSimpleFlowLocalStorageProvisioner(test) + } +} + +func TestTinkerbellBottleRocketSingleNodeCuratedPackagesHarborFlow(t *testing.T) { + for _, version := range KubeVersions { + test := framework.NewClusterE2ETest(t, + framework.NewTinkerbell(t, framework.WithBottleRocketTinkerbell()), + framework.WithClusterSingleNode(version), + framework.WithControlPlaneHardware(1), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageHarborInstallSimpleFlowLocalStorageProvisioner(test) + } +} + +func TestTinkerbellUbuntuSingleNodeCuratedPackagesAdotSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewTinkerbell(t, kubeVersionTinkerbellOpt(version)), + framework.WithClusterSingleNode(version), + framework.WithControlPlaneHardware(1), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackagesAdotInstallTinkerbellSimpleFlow(test) + } +} + +func TestTinkerbellBottleRocketSingleNodeCuratedPackagesAdotSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewTinkerbell(t, framework.WithBottleRocketTinkerbell()), + framework.WithClusterSingleNode(version), + framework.WithControlPlaneHardware(1), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackagesAdotInstallTinkerbellSimpleFlow(test) + } +} + +func TestTinkerbellUbuntuSingleNodeCuratedPackagesPrometheusSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewTinkerbell(t, kubeVersionTinkerbellOpt(version)), + framework.WithClusterSingleNode(version), + framework.WithControlPlaneHardware(1), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackagesPrometheusInstallSimpleFlow(test) + } +} + +func TestTinkerbellBottleRocketSingleNodeCuratedPackagesPrometheusSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewTinkerbell(t, framework.WithBottleRocketTinkerbell()), + framework.WithClusterSingleNode(version), + framework.WithControlPlaneHardware(1), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackagesPrometheusInstallSimpleFlow(test) + } } // Single node diff --git a/test/e2e/vsphere_test.go b/test/e2e/vsphere_test.go index a1d45462265a..46080b2f98f6 100644 --- a/test/e2e/vsphere_test.go +++ b/test/e2e/vsphere_test.go @@ -5,6 +5,7 @@ package e2e import ( + "fmt" "os" "testing" @@ -211,406 +212,266 @@ func TestVSphereKubernetes126To127AWSIamAuthUpgrade(t *testing.T) { } // Curated packages -func TestVSphereKubernetes125CuratedPackagesEmissarySimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithUbuntu125()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageEmissaryInstallSimpleFlow(test) -} - -func TestVSphereKubernetes125BottleRocketCuratedPackagesEmissarySimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithBottleRocket125()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageEmissaryInstallSimpleFlow(test) -} - -func TestVSphereKubernetes123CuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithUbuntu123()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube123), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallSimpleFlow(test) -} - -func TestVSphereKubernetes123BottleRocketCuratedPackagesSimpleFlow(t *testing.T) { - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithBottleRocket123()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube123), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallSimpleFlow(test) -} - -func TestVSphereKubernetes124CuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithUbuntu124()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube124)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube124), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallSimpleFlow(test) -} - -func TestVSphereKubernetes124BottleRocketCuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithBottleRocket124()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube124)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube124), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallSimpleFlow(test) -} - -func TestVSphereKubernetes125CuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithUbuntu125()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallSimpleFlow(test) -} - -func TestVSphereKubernetes125BottleRocketCuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithBottleRocket125()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - - runCuratedPackageInstallSimpleFlow(test) -} - -func TestVSphereKubernetes126CuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithUbuntu126()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube126), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallSimpleFlow(test) -} - -func TestVSphereKubernetes126BottleRocketCuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithBottleRocket126()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube126), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - - runCuratedPackageInstallSimpleFlow(test) -} - -func TestVSphereKubernetes127CuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithUbuntu127()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube127)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube127), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackageInstallSimpleFlow(test) -} - -func TestVSphereKubernetes127BottleRocketCuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithBottleRocket127()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube127)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube127), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - - runCuratedPackageInstallSimpleFlow(test) -} - -func TestVSphereKubernetes123BottleRocketWorkloadClusterCuratedPackagesCertManagerSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - framework.CheckCertManagerCredentials(t) - provider := framework.NewVSphere(t, framework.WithBottleRocket123()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube123) - runCertManagerRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes124BottleRocketWorkloadClusterCuratedPackagesCertManagerSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - framework.CheckCertManagerCredentials(t) - provider := framework.NewVSphere(t, framework.WithBottleRocket124()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube124) - runCertManagerRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes125BottleRocketWorkloadClusterCuratedPackagesCertManagerSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - framework.CheckCertManagerCredentials(t) - provider := framework.NewVSphere(t, framework.WithBottleRocket125()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube125) - runCertManagerRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes126BottleRocketWorkloadClusterCuratedPackagesCertManagerSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - framework.CheckCertManagerCredentials(t) - provider := framework.NewVSphere(t, framework.WithBottleRocket126()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube126) - runCertManagerRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes127BottleRocketWorkloadClusterCuratedPackagesCertManagerSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - framework.CheckCertManagerCredentials(t) - provider := framework.NewVSphere(t, framework.WithBottleRocket127()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube127) - runCertManagerRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes125UbuntuWorkloadClusterCuratedPackagesEmissarySimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - provider := framework.NewVSphere(t, framework.WithUbuntu125()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube125) - runCuratedPackageEmissaryRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes125BottleRocketWorkloadClusterCuratedPackagesEmissarySimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - provider := framework.NewVSphere(t, framework.WithBottleRocket125()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube125) - runCuratedPackageEmissaryRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes123UbuntuWorkloadClusterCuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - provider := framework.NewVSphere(t, framework.WithUbuntu123()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube123) - runCuratedPackageRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes123BottleRocketWorkloadClusterCuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - provider := framework.NewVSphere(t, framework.WithBottleRocket123()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube123) - runCuratedPackageRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes124UbuntuWorkloadClusterCuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - provider := framework.NewVSphere(t, framework.WithUbuntu124()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube124) - runCuratedPackageRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes124BottleRocketWorkloadClusterCuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - provider := framework.NewVSphere(t, framework.WithBottleRocket124()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube124) - runCuratedPackageRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes125UbuntuWorkloadClusterCuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - provider := framework.NewVSphere(t, framework.WithUbuntu125()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube125) - runCuratedPackageRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes125BottleRocketWorkloadClusterCuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - provider := framework.NewVSphere(t, framework.WithBottleRocket125()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube125) - runCuratedPackageRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes126UbuntuWorkloadClusterCuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - provider := framework.NewVSphere(t, framework.WithUbuntu126()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube126) - runCuratedPackageRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes126BottleRocketWorkloadClusterCuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - provider := framework.NewVSphere(t, framework.WithBottleRocket126()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube126) - runCuratedPackageRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes127UbuntuWorkloadClusterCuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - provider := framework.NewVSphere(t, framework.WithUbuntu127()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube127) - runCuratedPackageRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes127BottleRocketWorkloadClusterCuratedPackagesSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - provider := framework.NewVSphere(t, framework.WithBottleRocket127()) - test := SetupSimpleMultiCluster(t, provider, v1alpha1.Kube127) - runCuratedPackageRemoteClusterInstallSimpleFlow(test) -} - -func TestVSphereKubernetes125BottleRocketCuratedPackagesAdotUpdateFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithBottleRocket125()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackagesAdotInstallUpdateFlow(test) -} - -func TestVSphereKubernetes123UbuntuCuratedPackagesAdotUpdateFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithUbuntu123()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube123), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackagesAdotInstallUpdateFlow(test) -} - -func TestVSphereKubernetes125UbuntuCuratedPackagesClusterAutoscalerSimpleFlow(t *testing.T) { - minNodes := 1 - maxNodes := 2 - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithUbuntu125()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125), api.WithWorkerNodeAutoScalingConfig(minNodes, maxNodes)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runAutoscalerWithMetricsServerSimpleFlow(test) -} - -func TestVSphereKubernetes125BottleRocketCuratedPackagesClusterAutoscalerSimpleFlow(t *testing.T) { - minNodes := 1 - maxNodes := 2 - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithBottleRocket125()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125), api.WithWorkerNodeAutoScalingConfig(minNodes, maxNodes)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runAutoscalerWithMetricsServerSimpleFlow(test) -} - -func TestVSphereKubernetes126UbuntuCuratedPackagesClusterAutoscalerSimpleFlow(t *testing.T) { - minNodes := 1 - maxNodes := 2 - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithUbuntu126()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126), api.WithWorkerNodeAutoScalingConfig(minNodes, maxNodes)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube126), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runAutoscalerWithMetricsServerSimpleFlow(test) -} - -func TestVSphereKubernetes126BottleRocketCuratedPackagesClusterAutoscalerSimpleFlow(t *testing.T) { - minNodes := 1 - maxNodes := 2 - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithBottleRocket126()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126), api.WithWorkerNodeAutoScalingConfig(minNodes, maxNodes)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube126), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runAutoscalerWithMetricsServerSimpleFlow(test) +var KubeVersions = []v1alpha1.KubernetesVersion{v1alpha1.Kube123, v1alpha1.Kube124, v1alpha1.Kube125, v1alpha1.Kube126, v1alpha1.Kube127} + +func kubeVersionVSphereOptUbuntu(version v1alpha1.KubernetesVersion) framework.VSphereOpt { + switch version { + case v1alpha1.Kube123: + return framework.WithUbuntu123() + case v1alpha1.Kube124: + return framework.WithUbuntu124() + case v1alpha1.Kube125: + return framework.WithUbuntu125() + case v1alpha1.Kube126: + return framework.WithUbuntu126() + case v1alpha1.Kube127: + return framework.WithUbuntu127() + default: + panic(fmt.Sprintf("unsupported version: %v", version)) + } +} + +func kubeVersionVSphereOptBottleRocket(version v1alpha1.KubernetesVersion) framework.VSphereOpt { + switch version { + case v1alpha1.Kube123: + return framework.WithBottleRocket123() + case v1alpha1.Kube124: + return framework.WithBottleRocket124() + case v1alpha1.Kube125: + return framework.WithBottleRocket125() + case v1alpha1.Kube126: + return framework.WithBottleRocket126() + case v1alpha1.Kube127: + return framework.WithBottleRocket127() + default: + panic(fmt.Sprintf("unsupported version: %v", version)) + } +} + +func TestVSphereCuratedPackagesSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewVSphere(t, kubeVersionVSphereOptUbuntu(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageInstallSimpleFlow(test) + } +} + +func TestVSphereBottleRocketCuratedPackagesSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + test := framework.NewClusterE2ETest(t, + framework.NewVSphere(t, kubeVersionVSphereOptBottleRocket(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageInstallSimpleFlow(test) + } +} + +func TestVSphereCuratedPackagesEmissarySimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewVSphere(t, kubeVersionVSphereOptUbuntu(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageEmissaryInstallSimpleFlow(test) + } +} + +func TestVSphereBottleRocketCuratedPackagesEmissarySimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewVSphere(t, kubeVersionVSphereOptBottleRocket(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageEmissaryInstallSimpleFlow(test) + } +} + +func TestVSphereCuratedPackagesHarborSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewVSphere(t, kubeVersionVSphereOptUbuntu(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageHarborInstallSimpleFlowLocalStorageProvisioner(test) + } +} + +func TestVSphereBottleRocketCuratedPackagesHarborSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + test := framework.NewClusterE2ETest(t, + framework.NewVSphere(t, kubeVersionVSphereOptBottleRocket(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackageHarborInstallSimpleFlowLocalStorageProvisioner(test) + } +} + +func TestVSphereCuratedPackagesAdotUpdateFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewVSphere(t, kubeVersionVSphereOptUbuntu(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackagesAdotInstallUpdateFlow(test) + } +} + +func TestVSphereBottleRocketCuratedPackagesAdotUpdateFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewVSphere(t, kubeVersionVSphereOptBottleRocket(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackagesAdotInstallUpdateFlow(test) + } } -func TestVSphereKubernetes127UbuntuCuratedPackagesClusterAutoscalerSimpleFlow(t *testing.T) { +func TestVSphereUbuntuCuratedPackagesClusterAutoscalerSimpleFlow(t *testing.T) { minNodes := 1 maxNodes := 2 - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithUbuntu127()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube127), api.WithWorkerNodeAutoScalingConfig(minNodes, maxNodes)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube127), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runAutoscalerWithMetricsServerSimpleFlow(test) + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewVSphere(t, kubeVersionVSphereOptUbuntu(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version), api.WithWorkerNodeAutoScalingConfig(minNodes, maxNodes)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runAutoscalerWithMetricsServerSimpleFlow(test) + } } -func TestVSphereKubernetes127BottleRocketCuratedPackagesClusterAutoscalerSimpleFlow(t *testing.T) { +func TestVSphereBottleRocketCuratedPackagesClusterAutoscalerSimpleFlow(t *testing.T) { minNodes := 1 maxNodes := 2 - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithBottleRocket127()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube127), api.WithWorkerNodeAutoScalingConfig(minNodes, maxNodes)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube127), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runAutoscalerWithMetricsServerSimpleFlow(test) -} - -func TestVSphereKubernetes125UbuntuCuratedPackagesPrometheusSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithUbuntu125()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube125)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube125), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackagesPrometheusInstallSimpleFlow(test) -} - -func TestVSphereKubernetes123BottleRocketCuratedPackagesPrometheusSimpleFlow(t *testing.T) { - framework.CheckCuratedPackagesCredentials(t) - test := framework.NewClusterE2ETest(t, - framework.NewVSphere(t, framework.WithBottleRocket123()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)), - framework.WithPackageConfig(t, packageBundleURI(v1alpha1.Kube123), - EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, - EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), - ) - runCuratedPackagesPrometheusInstallSimpleFlow(test) + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewVSphere(t, kubeVersionVSphereOptBottleRocket(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version), api.WithWorkerNodeAutoScalingConfig(minNodes, maxNodes)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runAutoscalerWithMetricsServerSimpleFlow(test) + } +} + +func TestVSphereUbuntuCuratedPackagesPrometheusSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewVSphere(t, kubeVersionVSphereOptUbuntu(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackagesPrometheusInstallSimpleFlow(test) + } +} + +func TestVSphereBottleRocketCuratedPackagesPrometheusSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + test := framework.NewClusterE2ETest(t, + framework.NewVSphere(t, kubeVersionVSphereOptBottleRocket(version)), + framework.WithClusterFiller(api.WithKubernetesVersion(version)), + framework.WithPackageConfig(t, packageBundleURI(version), + EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, + EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), + ) + runCuratedPackagesPrometheusInstallSimpleFlow(test) + } +} + +func TestVSphereUbuntuWorkloadClusterCuratedPackagesSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + provider := framework.NewVSphere(t, kubeVersionVSphereOptUbuntu(version)) + test := SetupSimpleMultiCluster(t, provider, version) + runCuratedPackageRemoteClusterInstallSimpleFlow(test) + } +} + +func TestVSphereBottleRocketWorkloadClusterCuratedPackagesSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + provider := framework.NewVSphere(t, kubeVersionVSphereOptBottleRocket(version)) + test := SetupSimpleMultiCluster(t, provider, version) + runCuratedPackageRemoteClusterInstallSimpleFlow(test) + } +} + +func TestVSphereUbuntuWorkloadClusterCuratedPackagesEmissarySimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + provider := framework.NewVSphere(t, kubeVersionVSphereOptUbuntu(version)) + test := SetupSimpleMultiCluster(t, provider, version) + runCuratedPackageEmissaryRemoteClusterInstallSimpleFlow(test) + } +} + +func TestVSphereBottleRocketWorkloadClusterCuratedPackagesEmissarySimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + provider := framework.NewVSphere(t, kubeVersionVSphereOptBottleRocket(version)) + test := SetupSimpleMultiCluster(t, provider, version) + runCuratedPackageEmissaryRemoteClusterInstallSimpleFlow(test) + } +} + +func TestVSphereUbuntuWorkloadClusterCuratedPackagesCertManagerSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + framework.CheckCertManagerCredentials(t) + provider := framework.NewVSphere(t, kubeVersionVSphereOptUbuntu(version)) + test := SetupSimpleMultiCluster(t, provider, version) + runCertManagerRemoteClusterInstallSimpleFlow(test) + } +} + +func TestVSphereBottleRocketWorkloadClusterCuratedPackagesCertManagerSimpleFlow(t *testing.T) { + for _, version := range KubeVersions { + framework.CheckCuratedPackagesCredentials(t) + framework.CheckCertManagerCredentials(t) + provider := framework.NewVSphere(t, kubeVersionVSphereOptBottleRocket(version)) + test := SetupSimpleMultiCluster(t, provider, version) + runCertManagerRemoteClusterInstallSimpleFlow(test) + } } // Disable CSI diff --git a/test/framework/cluster.go b/test/framework/cluster.go index 173ce40f606f..974d25e2a394 100644 --- a/test/framework/cluster.go +++ b/test/framework/cluster.go @@ -1300,7 +1300,7 @@ func (e *ClusterE2ETest) VerifyHarborPackageInstalled(prefix string, namespace s go func(name string) { defer wg.Done() err := e.KubectlClient.WaitForDeployment(ctx, - e.Cluster(), "10m", "Available", fmt.Sprintf("%s-harbor-%s", prefix, name), namespace) + e.Cluster(), "20m", "Available", fmt.Sprintf("%s-harbor-%s", prefix, name), namespace) if err != nil { errCh <- err } @@ -1309,7 +1309,7 @@ func (e *ClusterE2ETest) VerifyHarborPackageInstalled(prefix string, namespace s for _, name := range statefulsets { go func(name string) { defer wg.Done() - err := e.KubectlClient.Wait(ctx, e.kubeconfigFilePath(), "10m", "Ready", + err := e.KubectlClient.Wait(ctx, e.kubeconfigFilePath(), "20m", "Ready", fmt.Sprintf("pods/%s-harbor-%s-0", prefix, name), namespace) if err != nil { errCh <- err @@ -1361,14 +1361,14 @@ func (e *ClusterE2ETest) VerifyHelloPackageInstalled(packageName string, mgmtClu e.T.Log("Waiting for Package", packageName, "To be installed") err := e.KubectlClient.WaitForPackagesInstalled(ctx, - mgmtCluster, packageName, "10m", packageMetadatNamespace) + mgmtCluster, packageName, "20m", packageMetadatNamespace) if err != nil { e.T.Fatalf("waiting for hello-eks-anywhere package timed out: %s", err) } e.T.Log("Waiting for Package", packageName, "Deployment to be healthy") err = e.KubectlClient.WaitForDeployment(ctx, - e.Cluster(), "10m", "Available", "hello-eks-anywhere", constants.EksaPackagesName) + e.Cluster(), "20m", "Available", "hello-eks-anywhere", constants.EksaPackagesName) if err != nil { e.T.Fatalf("waiting for hello-eks-anywhere deployment timed out: %s", err) } @@ -1387,7 +1387,7 @@ func (e *ClusterE2ETest) VerifyAdotPackageInstalled(packageName string, targetNa e.T.Log("Waiting for package", packageName, "to be installed") err := e.KubectlClient.WaitForPackagesInstalled(ctx, - e.Cluster(), packageName, "10m", packageMetadatNamespace) + e.Cluster(), packageName, "20m", packageMetadatNamespace) if err != nil { e.T.Fatalf("waiting for adot package install timed out: %s", err) } @@ -1401,7 +1401,7 @@ func (e *ClusterE2ETest) VerifyAdotPackageInstalled(packageName string, targetNa e.T.Log("Waiting for package", packageName, "deployment to be available") err = e.KubectlClient.WaitForDeployment(ctx, - e.Cluster(), "10m", "Available", fmt.Sprintf("%s-aws-otel-collector", packageName), targetNamespace) + e.Cluster(), "20m", "Available", fmt.Sprintf("%s-aws-otel-collector", packageName), targetNamespace) if err != nil { e.T.Fatalf("waiting for adot deployment timed out: %s", err) } @@ -1454,14 +1454,14 @@ func (e *ClusterE2ETest) VerifyAdotPackageDeploymentUpdated(packageName string, e.T.Log("Waiting for package", packageName, "to be updated") err = e.KubectlClient.WaitForPackagesInstalled(ctx, - e.Cluster(), packageName, "10m", packageMetadatNamespace) + e.Cluster(), packageName, "20m", packageMetadatNamespace) if err != nil { e.T.Fatalf("waiting for adot package update timed out: %s", err) } e.T.Log("Waiting for package", packageName, "deployment to be available") err = e.KubectlClient.WaitForDeployment(ctx, - e.Cluster(), "10m", "Available", fmt.Sprintf("%s-aws-otel-collector", packageName), targetNamespace) + e.Cluster(), "20m", "Available", fmt.Sprintf("%s-aws-otel-collector", packageName), targetNamespace) if err != nil { e.T.Fatalf("waiting for adot deployment timed out: %s", err) } @@ -1507,7 +1507,7 @@ func (e *ClusterE2ETest) VerifyAdotPackageDaemonSetUpdated(packageName string, t e.T.Log("Waiting for package", packageName, "to be updated") err = e.KubectlClient.WaitForPackagesInstalled(ctx, - e.Cluster(), packageName, "10m", packageMetadatNamespace) + e.Cluster(), packageName, "20m", packageMetadatNamespace) if err != nil { e.T.Fatalf("waiting for adot package update timed out: %s", err) } @@ -1515,7 +1515,7 @@ func (e *ClusterE2ETest) VerifyAdotPackageDaemonSetUpdated(packageName string, t e.T.Log("Waiting for package", packageName, "daemonset to be rolled out") err = retrier.New(6 * time.Minute).Retry(func() error { return e.KubectlClient.WaitForResourceRolledout(ctx, - e.Cluster(), "10m", fmt.Sprintf("%s-aws-otel-collector-agent", packageName), targetNamespace, "daemonset") + e.Cluster(), "20m", fmt.Sprintf("%s-aws-otel-collector-agent", packageName), targetNamespace, "daemonset") }) if err != nil { e.T.Fatalf("waiting for adot daemonset timed out: %s", err) @@ -1557,7 +1557,7 @@ func (e *ClusterE2ETest) VerifyEmissaryPackageInstalled(packageName string, mgmt e.T.Log("Waiting for Package", packageName, "To be installed") err := e.KubectlClient.WaitForPackagesInstalled(ctx, - mgmtCluster, packageName, "10m", packageMetadatNamespace) + mgmtCluster, packageName, "20m", packageMetadatNamespace) if err != nil { e.T.Fatalf("waiting for emissary package timed out: %s", err) } @@ -1571,7 +1571,7 @@ func (e *ClusterE2ETest) VerifyEmissaryPackageInstalled(packageName string, mgmt e.T.Log("Waiting for Package", packageName, "Deployment to be healthy") err = e.KubectlClient.WaitForDeployment(ctx, - e.Cluster(), "10m", "Available", packageName, constants.EksaPackagesName) + e.Cluster(), "20m", "Available", packageName, constants.EksaPackagesName) if err != nil { e.T.Fatalf("waiting for emissary deployment timed out: %s", err) } @@ -1601,7 +1601,7 @@ func (e *ClusterE2ETest) TestEmissaryPackageRouting(packageName string, mgmtClus e.T.Log("Waiting for Package", packageName, "To be upgraded") err = e.KubectlClient.WaitForPackagesInstalled(ctx, - mgmtCluster, packageName, "10m", fmt.Sprintf("%s-%s", constants.EksaPackagesName, e.ClusterName)) + mgmtCluster, packageName, "20m", fmt.Sprintf("%s-%s", constants.EksaPackagesName, e.ClusterName)) if err != nil { e.T.Fatalf("waiting for emissary package upgrade timed out: %s", err) } @@ -1625,7 +1625,7 @@ func (e *ClusterE2ETest) VerifyPrometheusPackageInstalled(packageName string, ta e.T.Log("Waiting for package", packageName, "to be installed") err := e.KubectlClient.WaitForPackagesInstalled(ctx, - e.Cluster(), packageName, "10m", packageMetadatNamespace) + e.Cluster(), packageName, "20m", packageMetadatNamespace) if err != nil { e.T.Fatalf("waiting for prometheus package install timed out: %s", err) } @@ -1665,7 +1665,7 @@ func (e *ClusterE2ETest) VerifyCertManagerPackageInstalled(prefix string, namesp go func(name string) { defer wg.Done() err := e.KubectlClient.WaitForDeployment(ctx, - e.Cluster(), "10m", "Available", fmt.Sprintf("%s-%s", prefix, name), namespace) + e.Cluster(), "20m", "Available", fmt.Sprintf("%s-%s", prefix, name), namespace) if err != nil { errCh <- err } @@ -1869,14 +1869,14 @@ func (e *ClusterE2ETest) VerifyAutoScalerPackageInstalled(packageName string, ta }() err := e.KubectlClient.WaitForPackagesInstalled(ctx, - mgmtCluster, packageName, "10m", packageMetadatNamespace) + mgmtCluster, packageName, "20m", packageMetadatNamespace) if err != nil { e.T.Fatalf("waiting for Autoscaler Package to be avaliable") } e.T.Log("Waiting for Package", packageName, "Deployment to be healthy") err = e.KubectlClient.WaitForDeployment(ctx, - e.Cluster(), "10m", "Available", deploymentName, targetNamespace) + e.Cluster(), "20m", "Available", deploymentName, targetNamespace) if err != nil { e.T.Fatalf("waiting for cluster-autoscaler deployment timed out: %s", err) } @@ -1898,14 +1898,14 @@ func (e *ClusterE2ETest) VerifyMetricServerPackageInstalled(packageName string, }() err := e.KubectlClient.WaitForPackagesInstalled(ctx, - mgmtCluster, packageName, "10m", packageMetadatNamespace) + mgmtCluster, packageName, "20m", packageMetadatNamespace) if err != nil { e.T.Fatalf("waiting for Metric Server Package to be avaliable") } e.T.Log("Waiting for Package", packageName, "Deployment to be healthy") err = e.KubectlClient.WaitForDeployment(ctx, - e.Cluster(), "10m", "Available", deploymentName, targetNamespace) + e.Cluster(), "20m", "Available", deploymentName, targetNamespace) if err != nil { e.T.Fatalf("waiting for Metric Server deployment timed out: %s", err) }