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 committed Jul 22, 2024
1 parent 8569001 commit 056038b
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 056038b

Please sign in to comment.