Skip to content

Commit

Permalink
Merge pull request #2278 from openshift-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…2273-to-release_1.2.43

[release_1.2.43] OCM-9617 | feat: adding extra validation to fix panic introduced with httpTokens
  • Loading branch information
davidleerh authored Jul 23, 2024
2 parents f39ab9d + 037a95e commit 6533a61
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/machinepool/machinepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -955,12 +955,10 @@ func (m *machinePool) AddNodePool(cmd *cobra.Command, clusterKey string, cluster
return fmt.Errorf("Expected a valid http tokens value : %v", err)
}
}

if err = ocm.ValidateHttpTokensValue(httpTokens); err != nil {
return fmt.Errorf("Expected a valid http tokens value : %v", err)
}
if err := ocm.ValidateHttpTokensVersion(ocm.GetVersionMinor(version), httpTokens); err != nil {
return fmt.Errorf(err.Error())
}

npBuilder.AWSNodePool(createAwsNodePoolBuilder(instanceType, securityGroupIds, httpTokens, awsTags))

Expand Down

0 comments on commit 6533a61

Please sign in to comment.