Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
ValyaB committed Mar 22, 2024
1 parent 55c7bc7 commit ec742d0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions castai/resource_node_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -615,15 +615,15 @@ func toEKSConfig(obj map[string]interface{}) *sdk.NodeconfigV1EKSConfig {
out.VolumeKmsKeyArn = toPtr(v)
}

//if v, ok := obj["target_group"].([]interface{}); ok && len(v) > 0 {
// out.TargetGroup = &sdk.NodeconfigV1EKSConfigTargetGroup{}
// if arn, ok := v[0].(map[string]interface{})["arn"].(string); ok {
// out.TargetGroup.Arn = arn
// }
// if port, ok := v[0].(map[string]interface{})["port"].(int32); ok {
// out.TargetGroup.Port = toPtr(port)
// }
//}
if v, ok := obj["target_group"].([]interface{}); ok && len(v) > 0 {
out.TargetGroup = &sdk.NodeconfigV1TargetGroup{}
if arn, ok := v[0].(map[string]interface{})["arn"].(string); ok && arn != "" {
out.TargetGroup.Arn = toPtr(arn)
}
if port, ok := v[0].(map[string]interface{})["port"].(int32); ok && port > 0 && port < 65536 {
out.TargetGroup.Port = toPtr(port)
}
}

return out
}
Expand Down

0 comments on commit ec742d0

Please sign in to comment.