From be30fe600352b8721d1b6c676ffc73a46d771449 Mon Sep 17 00:00:00 2001 From: Saurabh Parekh Date: Sat, 14 Sep 2024 02:25:34 -0700 Subject: [PATCH] Remove 1.26 E2E tests for Nutanix (#8758) --- .../buildspecs/nutanix-test-eks-a-cli.yml | 3 - .../build/buildspecs/quick-test-eks-a-cli.yml | 3 - test/e2e/nutanix_test.go | 242 ------------------ test/framework/nutanix.go | 66 +---- 4 files changed, 3 insertions(+), 311 deletions(-) diff --git a/cmd/integration_test/build/buildspecs/nutanix-test-eks-a-cli.yml b/cmd/integration_test/build/buildspecs/nutanix-test-eks-a-cli.yml index abefb59e6b13..efcb438a6ce4 100644 --- a/cmd/integration_test/build/buildspecs/nutanix-test-eks-a-cli.yml +++ b/cmd/integration_test/build/buildspecs/nutanix-test-eks-a-cli.yml @@ -33,19 +33,16 @@ env: T_NUTANIX_POD_CIDR: "nutanix_ci:nutanix_pod_cidr" T_NUTANIX_SERVICE_CIDR: "nutanix_ci:nutanix_service_cidr" T_NUTANIX_ADDITIONAL_TRUST_BUNDLE: "nutanix_ci:nutanix_additional_trust_bundle" - T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_26: "nutanix_ci:nutanix_template_ubuntu_1_26" T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_27: "nutanix_ci:nutanix_template_ubuntu_1_27" T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_28: "nutanix_ci:nutanix_template_ubuntu_1_28" T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_29: "nutanix_ci:nutanix_template_ubuntu_1_29" T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_30: "nutanix_ci:nutanix_template_ubuntu_1_30" T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_31: "nutanix_ci:nutanix_template_ubuntu_1_31" - T_NUTANIX_TEMPLATE_NAME_REDHAT_1_26: "nutanix_ci:nutanix_template_rhel_8_1_26" T_NUTANIX_TEMPLATE_NAME_REDHAT_1_27: "nutanix_ci:nutanix_template_rhel_8_1_27" T_NUTANIX_TEMPLATE_NAME_REDHAT_1_28: "nutanix_ci:nutanix_template_rhel_8_1_28" T_NUTANIX_TEMPLATE_NAME_REDHAT_1_29: "nutanix_ci:nutanix_template_rhel_8_1_29" T_NUTANIX_TEMPLATE_NAME_REDHAT_1_30: "nutanix_ci:nutanix_template_rhel_8_1_30" T_NUTANIX_TEMPLATE_NAME_REDHAT_1_31: "nutanix_ci:nutanix_template_rhel_8_1_31" - T_NUTANIX_TEMPLATE_NAME_REDHAT_9_1_26: "nutanix_ci:nutanix_template_rhel_9_1_26" T_NUTANIX_TEMPLATE_NAME_REDHAT_9_1_27: "nutanix_ci:nutanix_template_rhel_9_1_27" T_NUTANIX_TEMPLATE_NAME_REDHAT_9_1_28: "nutanix_ci:nutanix_template_rhel_9_1_28" T_NUTANIX_TEMPLATE_NAME_REDHAT_9_1_29: "nutanix_ci:nutanix_template_rhel_9_1_29" diff --git a/cmd/integration_test/build/buildspecs/quick-test-eks-a-cli.yml b/cmd/integration_test/build/buildspecs/quick-test-eks-a-cli.yml index aad7aaa00707..02f8004a1b88 100644 --- a/cmd/integration_test/build/buildspecs/quick-test-eks-a-cli.yml +++ b/cmd/integration_test/build/buildspecs/quick-test-eks-a-cli.yml @@ -128,19 +128,16 @@ env: T_NUTANIX_POD_CIDR: "nutanix_ci:nutanix_pod_cidr" T_NUTANIX_SERVICE_CIDR: "nutanix_ci:nutanix_service_cidr" T_NUTANIX_ADDITIONAL_TRUST_BUNDLE: "nutanix_ci:nutanix_additional_trust_bundle" - T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_26: "nutanix_ci:nutanix_template_ubuntu_1_26" T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_27: "nutanix_ci:nutanix_template_ubuntu_1_27" T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_28: "nutanix_ci:nutanix_template_ubuntu_1_28" T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_29: "nutanix_ci:nutanix_template_ubuntu_1_29" T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_30: "nutanix_ci:nutanix_template_ubuntu_1_30" T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_31: "nutanix_ci:nutanix_template_ubuntu_1_31" - T_NUTANIX_TEMPLATE_NAME_REDHAT_1_26: "nutanix_ci:nutanix_template_rhel_8_1_26" T_NUTANIX_TEMPLATE_NAME_REDHAT_1_27: "nutanix_ci:nutanix_template_rhel_8_1_27" T_NUTANIX_TEMPLATE_NAME_REDHAT_1_28: "nutanix_ci:nutanix_template_rhel_8_1_28" T_NUTANIX_TEMPLATE_NAME_REDHAT_1_29: "nutanix_ci:nutanix_template_rhel_8_1_29" T_NUTANIX_TEMPLATE_NAME_REDHAT_1_30: "nutanix_ci:nutanix_template_rhel_8_1_30" T_NUTANIX_TEMPLATE_NAME_REDHAT_1_31: "nutanix_ci:nutanix_template_rhel_8_1_31" - T_NUTANIX_TEMPLATE_NAME_REDHAT_9_1_26: "nutanix_ci:nutanix_template_rhel_9_1_26" T_NUTANIX_TEMPLATE_NAME_REDHAT_9_1_27: "nutanix_ci:nutanix_template_rhel_9_1_27" T_NUTANIX_TEMPLATE_NAME_REDHAT_9_1_28: "nutanix_ci:nutanix_template_rhel_9_1_28" T_NUTANIX_TEMPLATE_NAME_REDHAT_9_1_29: "nutanix_ci:nutanix_template_rhel_9_1_29" diff --git a/test/e2e/nutanix_test.go b/test/e2e/nutanix_test.go index e2d6b4d8b436..8be1c22a65e4 100644 --- a/test/e2e/nutanix_test.go +++ b/test/e2e/nutanix_test.go @@ -13,17 +13,6 @@ import ( ) // Curated Packages -func TestNutanixKubernetes126UbuntuCuratedPackagesSimpleFlow(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 TestNutanixKubernetes127UbuntuCuratedPackagesSimpleFlow(t *testing.T) { test := framework.NewClusterE2ETest(t, framework.NewNutanix(t, framework.WithUbuntu127Nutanix()), @@ -80,18 +69,6 @@ func TestNutanixKubernetes131UbuntuCuratedPackagesSimpleFlow(t *testing.T) { } // Emissary -func TestNutanixKubernetes126UbuntuCuratedPackagesEmissarySimpleFlow(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 TestNutanixKubernetes127UbuntuCuratedPackagesEmissarySimpleFlow(t *testing.T) { framework.CheckCuratedPackagesCredentials(t) test := framework.NewClusterE2ETest(t, @@ -153,18 +130,6 @@ func TestNutanixKubernetes131UbuntuCuratedPackagesEmissarySimpleFlow(t *testing. } // ADOT -func TestNutanixKubernetes126UbuntuCuratedPackagesAdotSimpleFlow(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), - ) - runCuratedPackagesAdotInstallSimpleFlow(test) -} - func TestNutanixKubernetes127UbuntuCuratedPackagesAdotSimpleFlow(t *testing.T) { framework.CheckCuratedPackagesCredentials(t) test := framework.NewClusterE2ETest(t, @@ -226,18 +191,6 @@ func TestNutanixKubernetes131UbuntuCuratedPackagesAdotSimpleFlow(t *testing.T) { } // Prometheus -func TestNutanixKubernetes126UbuntuCuratedPackagesPrometheusSimpleFlow(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), - ) - runCuratedPackagesPrometheusInstallSimpleFlow(test) -} - func TestNutanixKubernetes127UbuntuCuratedPackagesPrometheusSimpleFlow(t *testing.T) { framework.CheckCuratedPackagesCredentials(t) test := framework.NewClusterE2ETest(t, @@ -299,20 +252,6 @@ func TestNutanixKubernetes131UbuntuCuratedPackagesPrometheusSimpleFlow(t *testin } // Cluster Autoscaler -func TestNutanixKubernetes126UbuntuCuratedPackagesClusterAutoscalerSimpleFlow(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 TestNutanixKubernetes127UbuntuCuratedPackagesClusterAutoscalerSimpleFlow(t *testing.T) { minNodes := 1 maxNodes := 2 @@ -384,17 +323,6 @@ func TestNutanixKubernetes131UbuntuCuratedPackagesClusterAutoscalerSimpleFlow(t } // Harbor -func TestNutanixKubernetes126UbuntuCuratedPackagesHarborSimpleFlow(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), - ) - runCuratedPackageHarborInstallSimpleFlowLocalStorageProvisioner(test) -} - func TestNutanixKubernetes127UbuntuCuratedPackagesHarborSimpleFlow(t *testing.T) { test := framework.NewClusterE2ETest(t, framework.NewNutanix(t, framework.WithUbuntu127Nutanix()), @@ -451,15 +379,6 @@ func TestNutanixKubernetes131UbuntuCuratedPackagesHarborSimpleFlow(t *testing.T) } // Simple Flow -func TestNutanixKubernetes126UbuntuSimpleFlowWithName(t *testing.T) { - test := framework.NewClusterE2ETest( - t, - framework.NewNutanix(t, framework.WithUbuntu126Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - ) - runSimpleFlow(test) -} - func TestNutanixKubernetes127UbuntuSimpleFlowWithName(t *testing.T) { test := framework.NewClusterE2ETest( t, @@ -505,15 +424,6 @@ func TestNutanixKubernetes131UbuntuSimpleFlowWithName(t *testing.T) { runSimpleFlow(test) } -func TestNutanixKubernetes126RedHat8SimpleFlowWithName(t *testing.T) { - test := framework.NewClusterE2ETest( - t, - framework.NewNutanix(t, framework.WithRedHat126Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - ) - runSimpleFlow(test) -} - func TestNutanixKubernetes127RedHat8SimpleFlowWithName(t *testing.T) { test := framework.NewClusterE2ETest( t, @@ -559,15 +469,6 @@ func TestNutanixKubernetes131RedHat8SimpleFlowWithName(t *testing.T) { runSimpleFlow(test) } -func TestNutanixKubernetes126RedHat9SimpleFlowWithName(t *testing.T) { - test := framework.NewClusterE2ETest( - t, - framework.NewNutanix(t, framework.WithRedHat9Kubernetes126Nutanix()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - ) - runSimpleFlow(test) -} - func TestNutanixKubernetes127RedHat9SimpleFlowWithName(t *testing.T) { test := framework.NewClusterE2ETest( t, @@ -613,17 +514,6 @@ func TestNutanixKubernetes131RedHat9SimpleFlowWithName(t *testing.T) { runSimpleFlow(test) } -func TestNutanixKubernetes126UbuntuSimpleFlowWithUUID(t *testing.T) { - test := framework.NewClusterE2ETest( - t, - framework.NewNutanix(t, framework.WithUbuntu126NutanixUUID(), - framework.WithPrismElementClusterUUID(), - framework.WithNutanixSubnetUUID()), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - ) - runSimpleFlow(test) -} - func TestNutanixKubernetes127UbuntuSimpleFlowWithUUID(t *testing.T) { test := framework.NewClusterE2ETest( t, @@ -768,23 +658,6 @@ func TestNutanixKubernetes131RedHat9SimpleFlowWithUUID(t *testing.T) { } // Upgrade -func TestNutanixKubernetes126To127UbuntuUpgrade(t *testing.T) { - provider := framework.NewNutanix(t, framework.WithUbuntu126Nutanix()) - test := framework.NewClusterE2ETest( - t, - provider, - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - framework.WithClusterFiller(api.WithControlPlaneCount(1)), - framework.WithClusterFiller(api.WithWorkerNodeCount(1)), - ) - runSimpleUpgradeFlow( - test, - v1alpha1.Kube127, - framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube127)), - provider.WithProviderUpgrade(provider.Ubuntu127Template()), - ) -} - func TestNutanixKubernetes127To128UbuntuUpgrade(t *testing.T) { provider := framework.NewNutanix(t, framework.WithUbuntu127Nutanix()) test := framework.NewClusterE2ETest( @@ -896,23 +769,6 @@ func TestNutanixKubernetes130To131UbuntuUpgrade(t *testing.T) { ) } -func TestNutanixKubernetes126to127RedHatUpgrade(t *testing.T) { - provider := framework.NewNutanix(t, framework.WithRedHat126Nutanix()) - test := framework.NewClusterE2ETest( - t, - provider, - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - framework.WithClusterFiller(api.WithControlPlaneCount(1)), - framework.WithClusterFiller(api.WithWorkerNodeCount(1)), - ) - runSimpleUpgradeFlow( - test, - v1alpha1.Kube127, - framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube127)), - provider.WithProviderUpgrade(provider.RedHat127Template()), - ) -} - func TestNutanixKubernetes127to128RedHatUpgrade(t *testing.T) { provider := framework.NewNutanix(t, framework.WithRedHat127Nutanix()) test := framework.NewClusterE2ETest( @@ -1159,24 +1015,6 @@ func TestNutanixKubernetes131UbuntuWorkerNodeScaleUp1To3(t *testing.T) { ) } -// 1 worker node cluster scaled up to 3 -func TestNutanixKubernetes126UbuntuWorkerNodeScaleUp1To3(t *testing.T) { - provider := framework.NewNutanix(t, framework.WithUbuntu126Nutanix()) - test := framework.NewClusterE2ETest( - t, - provider, - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - framework.WithClusterFiller(api.WithControlPlaneCount(1)), - framework.WithClusterFiller(api.WithEtcdCountIfExternal(1)), - framework.WithClusterFiller(api.WithWorkerNodeCount(1)), - ) - runSimpleUpgradeFlow( - test, - v1alpha1.Kube126, - framework.WithClusterUpgrade(api.WithWorkerNodeCount(3)), - ) -} - // 1 worker node cluster scaled up to 3 func TestNutanixKubernetes127UbuntuWorkerNodeScaleUp1To3(t *testing.T) { provider := framework.NewNutanix(t, framework.WithUbuntu127Nutanix()) @@ -1195,24 +1033,6 @@ func TestNutanixKubernetes127UbuntuWorkerNodeScaleUp1To3(t *testing.T) { ) } -// 1 node control plane cluster scaled up to 3 -func TestNutanixKubernetes126UbuntuControlPlaneNodeScaleUp1To3(t *testing.T) { - provider := framework.NewNutanix(t, framework.WithUbuntu126Nutanix()) - test := framework.NewClusterE2ETest( - t, - provider, - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - framework.WithClusterFiller(api.WithControlPlaneCount(1)), - framework.WithClusterFiller(api.WithEtcdCountIfExternal(1)), - framework.WithClusterFiller(api.WithWorkerNodeCount(3)), - ) - runSimpleUpgradeFlow( - test, - v1alpha1.Kube126, - framework.WithClusterFiller(api.WithControlPlaneCount(3)), - ) -} - // 1 node control plane cluster scaled up to 3 func TestNutanixKubernetes127UbuntuControlPlaneNodeScaleUp1To3(t *testing.T) { provider := framework.NewNutanix(t, framework.WithUbuntu127Nutanix()) @@ -1304,24 +1124,6 @@ func TestNutanixKubernetes131UbuntuControlPlaneNodeScaleUp1To3(t *testing.T) { ) } -// 3 worker node cluster scaled down to 1 -func TestNutanixKubernetes126UbuntuWorkerNodeScaleDown3To1(t *testing.T) { - provider := framework.NewNutanix(t, framework.WithUbuntu126Nutanix()) - test := framework.NewClusterE2ETest( - t, - provider, - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - framework.WithClusterFiller(api.WithControlPlaneCount(3)), - framework.WithClusterFiller(api.WithEtcdCountIfExternal(1)), - framework.WithClusterFiller(api.WithWorkerNodeCount(1)), - ) - runSimpleUpgradeFlow( - test, - v1alpha1.Kube126, - framework.WithClusterUpgrade(api.WithWorkerNodeCount(1)), - ) -} - // 3 worker node cluster scaled down to 1 func TestNutanixKubernetes127UbuntuWorkerNodeScaleDown3To1(t *testing.T) { provider := framework.NewNutanix(t, framework.WithUbuntu127Nutanix()) @@ -1412,24 +1214,6 @@ func TestNutanixKubernetes131UbuntuWorkerNodeScaleDown3To1(t *testing.T) { ) } -// 3 node control plane cluster scaled down to 1 -func TestNutanixKubernetes126UbuntuControlPlaneNodeScaleDown3To1(t *testing.T) { - provider := framework.NewNutanix(t, framework.WithUbuntu126Nutanix()) - test := framework.NewClusterE2ETest( - t, - provider, - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - framework.WithClusterFiller(api.WithControlPlaneCount(3)), - framework.WithClusterFiller(api.WithEtcdCountIfExternal(1)), - framework.WithClusterFiller(api.WithWorkerNodeCount(1)), - ) - runSimpleUpgradeFlow( - test, - v1alpha1.Kube126, - framework.WithClusterFiller(api.WithControlPlaneCount(1)), - ) -} - // 3 node control plane cluster scaled down to 1 func TestNutanixKubernetes127UbuntuControlPlaneNodeScaleDown3To1(t *testing.T) { provider := framework.NewNutanix(t, framework.WithUbuntu127Nutanix()) @@ -1521,19 +1305,6 @@ func TestNutanixKubernetes131UbuntuControlPlaneNodeScaleDown3To1(t *testing.T) { } // OIDC -func TestNutanixKubernetes126OIDC(t *testing.T) { - test := framework.NewClusterE2ETest( - t, - framework.NewNutanix(t, framework.WithUbuntu126Nutanix()), - framework.WithOIDC(), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - framework.WithClusterFiller(api.WithControlPlaneCount(1)), - framework.WithClusterFiller(api.WithEtcdCountIfExternal(1)), - framework.WithClusterFiller(api.WithWorkerNodeCount(1)), - ) - runOIDCFlow(test) -} - func TestNutanixKubernetes127OIDC(t *testing.T) { test := framework.NewClusterE2ETest( t, @@ -1600,19 +1371,6 @@ func TestNutanixKubernetes131OIDC(t *testing.T) { } // AWS IAM Auth -func TestNutanixKubernetes126AWSIamAuth(t *testing.T) { - test := framework.NewClusterE2ETest( - t, - framework.NewNutanix(t, framework.WithUbuntu126Nutanix()), - framework.WithAWSIam(), - framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube126)), - framework.WithClusterFiller(api.WithControlPlaneCount(1)), - framework.WithClusterFiller(api.WithEtcdCountIfExternal(1)), - framework.WithClusterFiller(api.WithWorkerNodeCount(1)), - ) - runAWSIamAuthFlow(test) -} - func TestNutanixKubernetes127AWSIamAuth(t *testing.T) { test := framework.NewClusterE2ETest( t, diff --git a/test/framework/nutanix.go b/test/framework/nutanix.go index 7adb5615c531..10ee70f3b818 100644 --- a/test/framework/nutanix.go +++ b/test/framework/nutanix.go @@ -33,19 +33,16 @@ const ( nutanixControlPlaneCidrVar = "T_NUTANIX_CONTROL_PLANE_CIDR" nutanixPodCidrVar = "T_NUTANIX_POD_CIDR" nutanixServiceCidrVar = "T_NUTANIX_SERVICE_CIDR" - nutanixTemplateNameUbuntu126Var = "T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_26" nutanixTemplateNameUbuntu127Var = "T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_27" nutanixTemplateNameUbuntu128Var = "T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_28" nutanixTemplateNameUbuntu129Var = "T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_29" nutanixTemplateNameUbuntu130Var = "T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_30" nutanixTemplateNameUbuntu131Var = "T_NUTANIX_TEMPLATE_NAME_UBUNTU_1_31" - nutanixTemplateNameRedHat126Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_1_26" nutanixTemplateNameRedHat127Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_1_27" nutanixTemplateNameRedHat128Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_1_28" nutanixTemplateNameRedHat129Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_1_29" nutanixTemplateNameRedHat130Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_1_30" nutanixTemplateNameRedHat131Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_1_31" - nutanixTemplateNameRedHat9126Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_9_1_26" nutanixTemplateNameRedHat9127Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_9_1_27" nutanixTemplateNameRedHat9128Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_9_1_28" nutanixTemplateNameRedHat9129Var = "T_NUTANIX_TEMPLATE_NAME_REDHAT_9_1_29" @@ -69,19 +66,16 @@ var requiredNutanixEnvVars = []string{ nutanixSubnetName, nutanixPodCidrVar, nutanixServiceCidrVar, - nutanixTemplateNameUbuntu126Var, nutanixTemplateNameUbuntu127Var, nutanixTemplateNameUbuntu128Var, nutanixTemplateNameUbuntu129Var, nutanixTemplateNameUbuntu130Var, nutanixTemplateNameUbuntu131Var, - nutanixTemplateNameRedHat126Var, nutanixTemplateNameRedHat127Var, nutanixTemplateNameRedHat128Var, nutanixTemplateNameRedHat129Var, nutanixTemplateNameRedHat130Var, nutanixTemplateNameRedHat131Var, - nutanixTemplateNameRedHat9126Var, nutanixTemplateNameRedHat9127Var, nutanixTemplateNameRedHat9128Var, nutanixTemplateNameRedHat9129Var, @@ -227,12 +221,6 @@ func withNutanixKubeVersionAndOS(kubeVersion anywherev1.KubernetesVersion, os OS } } -// WithUbuntu126Nutanix returns a NutanixOpt that adds API fillers to use a Ubuntu Nutanix template for k8s 1.26 -// and the "ubuntu" osFamily in all machine configs. -func WithUbuntu126Nutanix() NutanixOpt { - return withNutanixKubeVersionAndOS(anywherev1.Kube126, Ubuntu2004, nil) -} - // WithUbuntu127Nutanix returns a NutanixOpt that adds API fillers to use a Ubuntu Nutanix template for k8s 1.27 // and the "ubuntu" osFamily in all machine configs. func WithUbuntu127Nutanix() NutanixOpt { @@ -263,12 +251,6 @@ func WithUbuntu131Nutanix() NutanixOpt { return withNutanixKubeVersionAndOS(anywherev1.Kube131, Ubuntu2004, nil) } -// WithRedHat126Nutanix returns a NutanixOpt that adds API fillers to use a RedHat 8 Nutanix template for k8s 1.26 -// and the "redhat" osFamily in all machine configs. -func WithRedHat126Nutanix() NutanixOpt { - return withNutanixKubeVersionAndOS(anywherev1.Kube126, RedHat8, nil) -} - // WithRedHat127Nutanix returns a NutanixOpt that adds API fillers to use a RedHat 8 Nutanix template for k8s 1.27 // and the "redhat" osFamily in all machine configs. func WithRedHat127Nutanix() NutanixOpt { @@ -299,12 +281,6 @@ func WithRedHat131Nutanix() NutanixOpt { return withNutanixKubeVersionAndOS(anywherev1.Kube131, RedHat8, nil) } -// WithRedHat9Kubernetes126Nutanix returns a NutanixOpt that adds API fillers to use a RedHat 9 Nutanix template for k8s 1.26 -// and the "redhat" osFamily in all machine configs. -func WithRedHat9Kubernetes126Nutanix() NutanixOpt { - return withNutanixKubeVersionAndOS(anywherev1.Kube126, RedHat9, nil) -} - // WithRedHat9Kubernetes127Nutanix returns a NutanixOpt that adds API fillers to use a RedHat 9 Nutanix template for k8s 1.27 // and the "redhat" osFamily in all machine configs. func WithRedHat9Kubernetes127Nutanix() NutanixOpt { @@ -345,12 +321,6 @@ func withNutanixKubeVersionAndOSForUUID(kubeVersion anywherev1.KubernetesVersion } } -// WithUbuntu126NutanixUUID returns a NutanixOpt that adds API fillers to use a Ubuntu Nutanix template UUID for k8s 1.26 -// and the "ubuntu" osFamily in all machine configs. -func WithUbuntu126NutanixUUID() NutanixOpt { - return withNutanixKubeVersionAndOSForUUID(anywherev1.Kube126, Ubuntu2004, nil) -} - // WithUbuntu127NutanixUUID returns a NutanixOpt that adds API fillers to use a Ubuntu Nutanix template UUID for k8s 1.27 // and the "ubuntu" osFamily in all machine configs. func WithUbuntu127NutanixUUID() NutanixOpt { @@ -381,12 +351,6 @@ func WithUbuntu131NutanixUUID() NutanixOpt { return withNutanixKubeVersionAndOSForUUID(anywherev1.Kube131, Ubuntu2004, nil) } -// WithRedHat126NutanixUUID returns a NutanixOpt that adds API fillers to use a RedHat Nutanix template UUID for k8s 1.26 -// and the "redhat" osFamily in all machine configs. -func WithRedHat126NutanixUUID() NutanixOpt { - return withNutanixKubeVersionAndOSForUUID(anywherev1.Kube126, RedHat8, nil) -} - // WithRedHat127NutanixUUID returns a NutanixOpt that adds API fillers to use a RedHat Nutanix template UUID for k8s 1.27 // and the "redhat" osFamily in all machine configs. func WithRedHat127NutanixUUID() NutanixOpt { @@ -417,12 +381,6 @@ func WithRedHat131NutanixUUID() NutanixOpt { return withNutanixKubeVersionAndOSForUUID(anywherev1.Kube131, RedHat8, nil) } -// WithRedHat9Kubernetes126NutanixUUID returns a NutanixOpt that adds API fillers to use a RedHat 9 Nutanix template UUID for k8s 1.26 -// and the "redhat" osFamily in all machine configs. -func WithRedHat9Kubernetes126NutanixUUID() NutanixOpt { - return withNutanixKubeVersionAndOSForUUID(anywherev1.Kube126, RedHat9, nil) -} - // WithRedHat9Kubernetes127NutanixUUID returns a NutanixOpt that adds API fillers to use a RedHat 9 Nutanix template UUID for k8s 1.27 // and the "redhat" osFamily in all machine configs. func WithRedHat9Kubernetes127NutanixUUID() NutanixOpt { @@ -499,12 +457,6 @@ func (n *Nutanix) templateForKubeVersionAndOS(kubeVersion anywherev1.KubernetesV return api.WithNutanixMachineTemplateImageName(template) } -// Ubuntu126Template returns NutanixFiller by reading the env var and setting machine config's -// image name parameter in the spec. -func (n *Nutanix) Ubuntu126Template() api.NutanixFiller { - return n.templateForKubeVersionAndOS(anywherev1.Kube126, Ubuntu2004, nil) -} - // Ubuntu127Template returns NutanixFiller by reading the env var and setting machine config's // image name parameter in the spec. func (n *Nutanix) Ubuntu127Template() api.NutanixFiller { @@ -535,12 +487,6 @@ func (n *Nutanix) Ubuntu131Template() api.NutanixFiller { return n.templateForKubeVersionAndOS(anywherev1.Kube131, Ubuntu2004, nil) } -// RedHat126Template returns NutanixFiller by reading the env var and setting machine config's -// image name parameter in the spec. -func (n *Nutanix) RedHat126Template() api.NutanixFiller { - return n.templateForKubeVersionAndOS(anywherev1.Kube126, RedHat8, nil) -} - // RedHat127Template returns NutanixFiller by reading the env var and setting machine config's // image name parameter in the spec. func (n *Nutanix) RedHat127Template() api.NutanixFiller { @@ -571,12 +517,6 @@ func (n *Nutanix) RedHat131Template() api.NutanixFiller { return n.templateForKubeVersionAndOS(anywherev1.Kube131, RedHat8, nil) } -// RedHat9Kubernetes126Template returns NutanixFiller by reading the env var and setting machine config's -// image name parameter in the spec. -func (n *Nutanix) RedHat9Kubernetes126Template() api.NutanixFiller { - return n.templateForKubeVersionAndOS(anywherev1.Kube126, RedHat9, nil) -} - // RedHat9Kubernetes127Template returns NutanixFiller by reading the env var and setting machine config's // image name parameter in the spec. func (n *Nutanix) RedHat9Kubernetes127Template() api.NutanixFiller { @@ -632,19 +572,19 @@ func (n *Nutanix) templateForDevRelease(kubeVersion anywherev1.KubernetesVersion } // envVarForTemplate looks for explicit configuration through an env var: "T_NUTANIX_TEMPLATE_{osFamily}_{eks-d version}" -// eg: T_NUTANIX_TEMPLATE_UBUNTU_KUBERNETES_1_23_EKS_22. +// eg: T_NUTANIX_TEMPLATE_UBUNTU_KUBERNETES_1_27_EKS_22. func (n *Nutanix) envVarForTemplate(os OS, eksDName string) string { return fmt.Sprintf("T_NUTANIX_TEMPLATE_%s_%s", strings.ToUpper(strings.ReplaceAll(string(os), "-", "_")), strings.ToUpper(strings.ReplaceAll(eksDName, "-", "_"))) } // defaultNameForTemplate looks for a template: "{eks-d version}-{osFamily}" -// eg: kubernetes-1-23-eks-22-ubuntu. +// eg: kubernetes-1-27-eks-22-ubuntu. func (n *Nutanix) defaultNameForTemplate(os OS, eksDName string) string { return fmt.Sprintf("%s-%s", strings.ToLower(eksDName), strings.ToLower(string(os))) } // defaultEnvVarForTemplate returns the value of the default template env vars: "T_NUTANIX_TEMPLATE_{osFamily}_{kubeVersion}" -// eg. T_NUTANIX_TEMPLATE_UBUNTU_1_23. +// eg. T_NUTANIX_TEMPLATE_UBUNTU_1_27. func (n *Nutanix) defaultEnvVarForTemplate(os OS, kubeVersion anywherev1.KubernetesVersion) string { return fmt.Sprintf("T_NUTANIX_TEMPLATE_NAME_%s_%s", strings.ToUpper(strings.ReplaceAll(string(os), "-", "_")), strings.ReplaceAll(string(kubeVersion), ".", "_")) }