From 4f72ce6def2aa42cec5a04f216b9a99583c72d02 Mon Sep 17 00:00:00 2001 From: Kyle Wuolle Date: Mon, 2 Dec 2024 16:52:12 -0800 Subject: [PATCH] attempt to remove subnet spec as a test --- .../templates/azurecluster.yaml | 27 +++++++++---------- test/e2e/provider_aws_test.go | 16 ++--------- 2 files changed, 15 insertions(+), 28 deletions(-) diff --git a/templates/cluster/azure-hosted-cp/templates/azurecluster.yaml b/templates/cluster/azure-hosted-cp/templates/azurecluster.yaml index 56f246654..f49e45eb5 100644 --- a/templates/cluster/azure-hosted-cp/templates/azurecluster.yaml +++ b/templates/cluster/azure-hosted-cp/templates/azurecluster.yaml @@ -15,20 +15,19 @@ spec: vnet: resourceGroup: {{ .Values.resourceGroup }} name: {{ .Values.network.vnetName }} - subnets: - - name: {{ .Values.network.nodeSubnetName }} - # TODO this is just a test, if this works we need to consider changing this to be able to specify multiple subnets - role: node - routeTable: - name: {{ .Values.network.nodeRouteTableName }} - securityGroup: - name: {{ .Values.network.nodeSecurityGroupName }} - - name: {{ .Values.network.cpSubnetName }} - role: control-plane - routeTable: - name: {{ .Values.network.cpRouteTableName }} - securityGroup: - name: {{ .Values.network.cpSecurityGroupName }} +# subnets: +# - name: {{ .Values.network.nodeSubnetName }} +# role: node +# routeTable: +# name: {{ .Values.network.nodeRouteTableName }} +# securityGroup: +# name: {{ .Values.network.nodeSecurityGroupName }} +# - name: {{ .Values.network.cpSubnetName }} +# role: control-plane +# routeTable: +# name: {{ .Values.network.cpRouteTableName }} +# securityGroup: +# name: {{ .Values.network.cpSecurityGroupName }} location: {{ .Values.location }} {{- if .Values.bastion.enabled }} {{- with .Values.bastion.bastionSpec }} diff --git a/test/e2e/provider_aws_test.go b/test/e2e/provider_aws_test.go index 52586eba3..6614698b4 100644 --- a/test/e2e/provider_aws_test.go +++ b/test/e2e/provider_aws_test.go @@ -23,7 +23,6 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "k8s.io/utils/env" internalutils "github.com/Mirantis/hmc/internal/utils" "github.com/Mirantis/hmc/test/e2e/kubeclient" @@ -107,9 +106,8 @@ var _ = Describe("AWS Templates", Label("provider:cloud", "provider:aws"), Order kubeCfgPath, kubecfgDeleteFunc = kc.WriteKubeconfig(context.Background(), clusterName) GinkgoT().Setenv("KUBECONFIG", kubeCfgPath) - cmd := exec.Command("make", fmt.Sprintf("VERSION=%s", env.GetString("VERSION", "")), "test-apply") - output, err := utils.Run(cmd) - _, _ = fmt.Fprint(GinkgoWriter, string(output)) + cmd := exec.Command("make", "test-apply") + _, err := utils.Run(cmd) Expect(err).NotTo(HaveOccurred()) Expect(os.Unsetenv("KUBECONFIG")).To(Succeed()) @@ -126,16 +124,6 @@ var _ = Describe("AWS Templates", Label("provider:cloud", "provider:aws"), Order return nil }).WithTimeout(15 * time.Minute).WithPolling(10 * time.Second).Should(Succeed()) - Eventually(func() error { - By("Ensure cluster templates valid") - err = managedcluster.ValidateClusterTemplates(context.Background(), standaloneClient) - if err != nil { - _, _ = fmt.Fprintf(GinkgoWriter, "cluster tempolate validation failed: %v\n", err) - return err - } - return nil - }).WithTimeout(15 * time.Minute).WithPolling(10 * time.Second).Should(Succeed()) - // Ensure AWS credentials are set in the standalone cluster. clusteridentity.New(standaloneClient, managedcluster.ProviderAWS)