Skip to content

Commit

Permalink
Follow-up changes
Browse files Browse the repository at this point in the history
Signed-off-by: Parthvi Vala <[email protected]>
  • Loading branch information
valaparthvi committed Nov 13, 2024
1 parent 6fd55d1 commit 4edb95f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
2 changes: 1 addition & 1 deletion hosted/eks/helper/helper_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ func UpdateClusterTags(cluster *management.Cluster, client *rancher.Client, tags
}

// UpdateNodegroupMetadata updates the tags & labels of a EKS Node groups
// the give tags and labels will replace the existing counterparts
// the given tags and labels will replace the existing counterparts
// if wait is set to true, it waits until the update is complete; if checkClusterConfig is true, it validates the update
func UpdateNodegroupMetadata(cluster *management.Cluster, client *rancher.Client, tags, labels map[string]string, checkClusterConfig bool) (*management.Cluster, error) {
upgradedCluster := cluster
Expand Down
29 changes: 5 additions & 24 deletions hosted/eks/p1/p1_provisioning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,29 +140,10 @@ var _ = Describe("P1Provisioning", func() {
testCaseID = 274
createFunc := func(clusterConfig *eks.ClusterConfig) {
nodeGroups := *clusterConfig.NodeGroupsConfig
ngTemplate := nodeGroups[0]
gpuNG := eks.NodeGroupConfig{
Arm: ngTemplate.Arm,
DesiredSize: ngTemplate.DesiredSize,
DiskSize: ngTemplate.DiskSize,
Ec2SshKey: ngTemplate.Ec2SshKey,
Gpu: pointer.Bool(true),
ImageID: ngTemplate.ImageID,
InstanceType: pointer.String("p2.xlarge"),
Labels: ngTemplate.Labels,
LaunchTemplateConfig: ngTemplate.LaunchTemplateConfig,
MaxSize: ngTemplate.MaxSize,
MinSize: ngTemplate.MinSize,
NodeRole: ngTemplate.NodeRole,
NodegroupName: pointer.String("gpuenabledng"),
RequestSpotInstances: ngTemplate.RequestSpotInstances,
ResourceTags: ngTemplate.ResourceTags,
SpotInstanceTypes: ngTemplate.SpotInstanceTypes,
Subnets: ngTemplate.Subnets,
Tags: ngTemplate.Tags,
UserData: ngTemplate.UserData,
Version: ngTemplate.Version,
}
gpuNG := nodeGroups[0]
gpuNG.Gpu = pointer.Bool(true)
gpuNG.NodegroupName = pointer.String("gpuenabledng")
gpuNG.InstanceType = pointer.String("p2.xlarge")
nodeGroups = append(nodeGroups, gpuNG)
clusterConfig.NodeGroupsConfig = &nodeGroups
}
Expand All @@ -181,7 +162,7 @@ var _ = Describe("P1Provisioning", func() {
amiID, err = helper.GetFromEKS(region, clusterName, "nodegroup", ".[].ImageID", "--name", *ng.NodegroupName)
Expect(err).To(BeNil())

if *ng.Gpu {
if ng.Gpu != nil && *ng.Gpu {
Expect(amiID).To(Equal("AL2_x86_64_GPU"))
} else {
Expect(amiID).To(Equal("AL2023_x86_64_STANDARD"))
Expand Down

0 comments on commit 4edb95f

Please sign in to comment.