Skip to content

Commit

Permalink
OCM-9617 | feat: adding extra validation to fix panic introduced with…
Browse files Browse the repository at this point in the history
… httpTokens
  • Loading branch information
den-rgb authored and openshift-cherrypick-robot committed Jul 23, 2024
1 parent f39ab9d commit 037a95e
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 037a95e

Please sign in to comment.