diff --git a/examples/service/ocean/providers/aws/create/main.go b/examples/service/ocean/providers/aws/create/main.go index 8cceb12f..6c3b112f 100644 --- a/examples/service/ocean/providers/aws/create/main.go +++ b/examples/service/ocean/providers/aws/create/main.go @@ -42,6 +42,7 @@ func main() { ClusterOrientation: &aws.ClusterOrientation{ AvailabilityVsCost: spotinst.String("cheapest"), }, + SpreadNodesBy: spotinst.String("vcpu"), }, Compute: &aws.Compute{ InstanceTypes: &aws.InstanceTypes{ diff --git a/service/ocean/providers/aws/cluster.go b/service/ocean/providers/aws/cluster.go index 5fd47953..e373c840 100644 --- a/service/ocean/providers/aws/cluster.go +++ b/service/ocean/providers/aws/cluster.go @@ -55,6 +55,7 @@ type Strategy struct { GracePeriod *int `json:"gracePeriod,omitempty"` UtilizeCommitments *bool `json:"utilizeCommitments,omitempty"` ClusterOrientation *ClusterOrientation `json:"clusterOrientation,omitempty"` + SpreadNodesBy *string `json:"spreadNodesBy,omitempty"` forceSendFields []string nullFields []string } @@ -1204,6 +1205,13 @@ func (o *Strategy) SetUtilizeCommitments(v *bool) *Strategy { return o } +func (o *Strategy) SetSpreadNodesBy(v *string) *Strategy { + if o.SpreadNodesBy = v; o.SpreadNodesBy == nil { + o.nullFields = append(o.nullFields, "SpreadNodesBy") + } + return o +} + // endregion // region Capacity