From d076e47d4ace533e6f683af1a94d5369ce484fec Mon Sep 17 00:00:00 2001 From: chandra1-n <86221454+chandra1-n@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:54:28 +0530 Subject: [PATCH 1/4] added `ExcludedVmSizes` and `SpotSizeAttributes` in Azure Stateful Node (#332) --- .../stateful/providers/azure/statefulNode.go | 84 ++++++++++++++++++- 1 file changed, 81 insertions(+), 3 deletions(-) diff --git a/service/stateful/providers/azure/statefulNode.go b/service/stateful/providers/azure/statefulNode.go index bc9b7ba8..7c6a8ccb 100644 --- a/service/stateful/providers/azure/statefulNode.go +++ b/service/stateful/providers/azure/statefulNode.go @@ -106,9 +106,23 @@ type Compute struct { } type VMSizes struct { - OnDemandSizes []string `json:"odSizes,omitempty"` - SpotSizes []string `json:"spotSizes,omitempty"` - PreferredSpotSizes []string `json:"preferredSpotSizes,omitempty"` + OnDemandSizes []string `json:"odSizes,omitempty"` + SpotSizes []string `json:"spotSizes,omitempty"` + PreferredSpotSizes []string `json:"preferredSpotSizes,omitempty"` + ExcludedVmSizes []string `json:"excludedVmSizes,omitempty"` + SpotSizeAttributes *SpotSizeAttributes `json:"spotSizeAttributes,omitempty"` + + forceSendFields []string + nullFields []string +} + +type SpotSizeAttributes struct { + MaxCpu *int `json:"maxCpu,omitempty"` + MaxMemory *int `json:"maxMemory,omitempty"` + MaxStorage *int `json:"maxStorage,omitempty"` + MinCpu *int `json:"minCpu,omitempty"` + MinMemory *int `json:"minMemory,omitempty"` + MinStorage *int `json:"minStorage,omitempty"` forceSendFields []string nullFields []string @@ -1342,8 +1356,72 @@ func (o *VMSizes) SetPreferredSpotSizes(v []string) *VMSizes { return o } +func (o *VMSizes) SetExcludedVmSizes(v []string) *VMSizes { + if o.ExcludedVmSizes = v; o.ExcludedVmSizes == nil { + o.nullFields = append(o.nullFields, "ExcludedVmSizes") + } + return o +} + +func (o *VMSizes) SetSpotSizeAttributes(v *SpotSizeAttributes) *VMSizes { + if o.SpotSizeAttributes = v; o.SpotSizeAttributes == nil { + o.nullFields = append(o.nullFields, "SpotSizeAttributes") + } + return o +} + // endregion +// region SpotSizeAttributes + +func (o SpotSizeAttributes) MarshalJSON() ([]byte, error) { + type noMethod SpotSizeAttributes + raw := noMethod(o) + return jsonutil.MarshalJSON(raw, o.forceSendFields, o.nullFields) +} + +func (o *SpotSizeAttributes) SetMaxCpu(v *int) *SpotSizeAttributes { + if o.MaxCpu = v; o.MaxCpu == nil { + o.nullFields = append(o.nullFields, "MaxCpu") + } + return o +} + +func (o *SpotSizeAttributes) SetMaxMemory(v *int) *SpotSizeAttributes { + if o.MaxMemory = v; o.MaxMemory == nil { + o.nullFields = append(o.nullFields, "MaxMemory") + } + return o +} + +func (o *SpotSizeAttributes) SetMaxStorage(v *int) *SpotSizeAttributes { + if o.MaxStorage = v; o.MaxStorage == nil { + o.nullFields = append(o.nullFields, "MaxStorage") + } + return o +} + +func (o *SpotSizeAttributes) SetMinCpu(v *int) *SpotSizeAttributes { + if o.MinCpu = v; o.MinCpu == nil { + o.nullFields = append(o.nullFields, "MinCpu") + } + return o +} + +func (o *SpotSizeAttributes) SetMinMemory(v *int) *SpotSizeAttributes { + if o.MinMemory = v; o.MinMemory == nil { + o.nullFields = append(o.nullFields, "MinMemory") + } + return o +} + +func (o *SpotSizeAttributes) SetMinStorage(v *int) *SpotSizeAttributes { + if o.MinStorage = v; o.MinStorage == nil { + o.nullFields = append(o.nullFields, "MinStorage") + } + return o +} + // region LaunchSpecification func (o LaunchSpecification) MarshalJSON() ([]byte, error) { From a3f073b9c8a3c91555053b26c449ed435a4cf7b6 Mon Sep 17 00:00:00 2001 From: chandra1-n <86221454+chandra1-n@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:10:14 +0530 Subject: [PATCH 2/4] chore(release): v1.376.0 --- spotinst/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spotinst/version.go b/spotinst/version.go index 475301dd..2655806c 100644 --- a/spotinst/version.go +++ b/spotinst/version.go @@ -1,7 +1,7 @@ package spotinst // SDKVersion is the current version of the SDK. -const SDKVersion = "1.375.0" +const SDKVersion = "1.376.0" // SDKName is the name of the SDK. const SDKName = "spotinst-sdk-go" From ca031bdbf81de7d25b63d3aae54679567c6ec8e7 Mon Sep 17 00:00:00 2001 From: chandra1-n <86221454+chandra1-n@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:40:52 +0530 Subject: [PATCH 3/4] Added `Scheduling` in ocean-aks-np-virtual-node-group (#333) --- service/ocean/providers/azure_np/nodegroup_np.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/service/ocean/providers/azure_np/nodegroup_np.go b/service/ocean/providers/azure_np/nodegroup_np.go index 1d339703..e326ad77 100644 --- a/service/ocean/providers/azure_np/nodegroup_np.go +++ b/service/ocean/providers/azure_np/nodegroup_np.go @@ -26,6 +26,7 @@ type VirtualNodeGroup struct { AutoScale *AutoScale `json:"autoScale,omitempty"` Taints []*Taint `json:"taints,omitempty"` VmSizes *VmSizes `json:"vmSizes,omitempty"` + Scheduling *Scheduling `json:"scheduling,omitempty"` // Read-only fields. CreatedAt *time.Time `json:"createdAt,omitempty"` @@ -323,4 +324,11 @@ func (o *VirtualNodeGroup) SetVmSizes(v *VmSizes) *VirtualNodeGroup { return o } +func (o *VirtualNodeGroup) SetScheduling(v *Scheduling) *VirtualNodeGroup { + if o.Scheduling = v; o.Scheduling == nil { + o.nullFields = append(o.nullFields, "Scheduling") + } + return o +} + //endregion From 8fd51e8128296a4c2db18d50898ae377386c30df Mon Sep 17 00:00:00 2001 From: chandra1-n <86221454+chandra1-n@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:47:42 +0530 Subject: [PATCH 4/4] chore(release): v1.377.0 --- spotinst/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spotinst/version.go b/spotinst/version.go index 2655806c..0848c87f 100644 --- a/spotinst/version.go +++ b/spotinst/version.go @@ -1,7 +1,7 @@ package spotinst // SDKVersion is the current version of the SDK. -const SDKVersion = "1.376.0" +const SDKVersion = "1.377.0" // SDKName is the name of the SDK. const SDKName = "spotinst-sdk-go"