Skip to content

Commit

Permalink
Fix up AWS validation, update Azure template as a test
Browse files Browse the repository at this point in the history
  • Loading branch information
kylewuolle committed Nov 29, 2024
1 parent 4348814 commit 24a4118
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ spec:
name: {{ .Values.network.vnetName }}
subnets:
- name: {{ .Values.network.nodeSubnetName }}
role: node
# TODO this is just a test, if this works we need to consider changing this to be able to specify multiple subnets
role: cluster
routeTable:
name: {{ .Values.network.routeTableName }}
securityGroup:
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/managedcluster/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func PopulateHostedTemplateVars(ctx context.Context, kc *kubeclient.KubeClient,

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

securityGroupID, found, err := unstructured.NestedString(
awsCluster.Object, "status", "networkStatus", "securityGroups", "node", "id")
Expand Down
16 changes: 7 additions & 9 deletions test/e2e/managedcluster/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ const (
EnvVarNoCleanup = "NO_CLEANUP"

// AWS
EnvVarAWSAccessKeyID = "AWS_ACCESS_KEY_ID"
EnvVarAWSSecretAccessKey = "AWS_SECRET_ACCESS_KEY"
EnvVarAWSVPCID = "AWS_VPC_ID"
EnvVarAWSSubnetID = "AWS_SUBNET_ID"
EnvVarAWSSubnetAvailabilityZone = "AWS_SUBNET_AVAILABILITY_ZONE"
EnvVarAWSInstanceType = "AWS_INSTANCE_TYPE"
EnvVarAWSSecurityGroupID = "AWS_SG_ID"
EnvVarAWSClusterIdentity = "AWS_CLUSTER_IDENTITY"
EnvVarSubnets = "AWS_SUBNETS"
EnvVarAWSAccessKeyID = "AWS_ACCESS_KEY_ID"
EnvVarAWSSecretAccessKey = "AWS_SECRET_ACCESS_KEY"
EnvVarAWSVPCID = "AWS_VPC_ID"
EnvVarAWSInstanceType = "AWS_INSTANCE_TYPE"
EnvVarAWSSecurityGroupID = "AWS_SG_ID"
EnvVarAWSClusterIdentity = "AWS_CLUSTER_IDENTITY"
EnvVarAWSSubnets = "AWS_SUBNETS"

// VSphere
EnvVarVSphereUser = "VSPHERE_USER"
Expand Down
4 changes: 1 addition & 3 deletions test/e2e/managedcluster/managedcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ func GetUnstructured(templateName Template) *unstructured.Unstructured {
// since we populate the vars from standalone prior to this step.
ValidateDeploymentVars([]string{
EnvVarAWSVPCID,
EnvVarAWSSubnetID,
EnvVarAWSSubnetAvailabilityZone,
EnvVarAWSSecurityGroupID,
EnvVarAWSSubnets,
})
managedClusterTemplateBytes = awsHostedCPManagedClusterTemplateBytes
case TemplateVSphereStandaloneCP:
Expand Down

0 comments on commit 24a4118

Please sign in to comment.