Skip to content

Commit

Permalink
attempt to remove subnet spec as a test
Browse files Browse the repository at this point in the history
  • Loading branch information
kylewuolle committed Dec 4, 2024
1 parent 469f79d commit 4f72ce6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 28 deletions.
27 changes: 13 additions & 14 deletions templates/cluster/azure-hosted-cp/templates/azurecluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
16 changes: 2 additions & 14 deletions test/e2e/provider_aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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())

Expand All @@ -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)

Expand Down

0 comments on commit 4f72ce6

Please sign in to comment.