Skip to content

Commit 24a4118

Browse files
committed
Fix up AWS validation, update Azure template as a test
1 parent 4348814 commit 24a4118

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

templates/cluster/azure-hosted-cp/templates/azurecluster.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ spec:
1717
name: {{ .Values.network.vnetName }}
1818
subnets:
1919
- name: {{ .Values.network.nodeSubnetName }}
20-
role: node
20+
# TODO this is just a test, if this works we need to consider changing this to be able to specify multiple subnets
21+
role: cluster
2122
routeTable:
2223
name: {{ .Values.network.routeTableName }}
2324
securityGroup:

test/e2e/managedcluster/aws/aws.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func PopulateHostedTemplateVars(ctx context.Context, kc *kubeclient.KubeClient,
6767

6868
subnetYaml, err := yaml.Marshal(subnetMaps)
6969
Expect(err).NotTo(HaveOccurred(), "failed to get marshall subnet maps")
70-
GinkgoT().Setenv(managedcluster.EnvVarSubnets, string(subnetYaml))
70+
GinkgoT().Setenv(managedcluster.EnvVarAWSSubnets, string(subnetYaml))
7171

7272
securityGroupID, found, err := unstructured.NestedString(
7373
awsCluster.Object, "status", "networkStatus", "securityGroups", "node", "id")

test/e2e/managedcluster/constants.go

+7-9
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@ const (
2525
EnvVarNoCleanup = "NO_CLEANUP"
2626

2727
// AWS
28-
EnvVarAWSAccessKeyID = "AWS_ACCESS_KEY_ID"
29-
EnvVarAWSSecretAccessKey = "AWS_SECRET_ACCESS_KEY"
30-
EnvVarAWSVPCID = "AWS_VPC_ID"
31-
EnvVarAWSSubnetID = "AWS_SUBNET_ID"
32-
EnvVarAWSSubnetAvailabilityZone = "AWS_SUBNET_AVAILABILITY_ZONE"
33-
EnvVarAWSInstanceType = "AWS_INSTANCE_TYPE"
34-
EnvVarAWSSecurityGroupID = "AWS_SG_ID"
35-
EnvVarAWSClusterIdentity = "AWS_CLUSTER_IDENTITY"
36-
EnvVarSubnets = "AWS_SUBNETS"
28+
EnvVarAWSAccessKeyID = "AWS_ACCESS_KEY_ID"
29+
EnvVarAWSSecretAccessKey = "AWS_SECRET_ACCESS_KEY"
30+
EnvVarAWSVPCID = "AWS_VPC_ID"
31+
EnvVarAWSInstanceType = "AWS_INSTANCE_TYPE"
32+
EnvVarAWSSecurityGroupID = "AWS_SG_ID"
33+
EnvVarAWSClusterIdentity = "AWS_CLUSTER_IDENTITY"
34+
EnvVarAWSSubnets = "AWS_SUBNETS"
3735

3836
// VSphere
3937
EnvVarVSphereUser = "VSPHERE_USER"

test/e2e/managedcluster/managedcluster.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ func GetUnstructured(templateName Template) *unstructured.Unstructured {
127127
// since we populate the vars from standalone prior to this step.
128128
ValidateDeploymentVars([]string{
129129
EnvVarAWSVPCID,
130-
EnvVarAWSSubnetID,
131-
EnvVarAWSSubnetAvailabilityZone,
132-
EnvVarAWSSecurityGroupID,
130+
EnvVarAWSSubnets,
133131
})
134132
managedClusterTemplateBytes = awsHostedCPManagedClusterTemplateBytes
135133
case TemplateVSphereStandaloneCP:

0 commit comments

Comments
 (0)