diff --git a/examples/service/ocean/providers/azure_np/create/main.go b/examples/service/ocean/providers/azure_np/create/main.go index edfd1192..74562e8e 100644 --- a/examples/service/ocean/providers/azure_np/create/main.go +++ b/examples/service/ocean/providers/azure_np/create/main.go @@ -68,6 +68,7 @@ func main() { GracePeriod: spotinst.Int(600), }, VirtualNodeGroupTemplate: &azure_np.VirtualNodeGroupTemplate{ + AvailabilityZones: []string{"1", "2"}, NodePoolProperties: &azure_np.NodePoolProperties{ MaxPodsPerNode: spotinst.Int(110), EnableNodePublicIP: spotinst.Bool(false), @@ -76,6 +77,8 @@ func main() { OsType: spotinst.String("Windows"), OsSKU: spotinst.String("Windows2019"), KubernetesVersion: spotinst.String("1.26"), + PodSubnetIDs: []string{"/subscriptions/123456-1234-1234-1234-123456789/resourceGroups/ExampleResourceGroup/providers/Microsoft.Network/virtualNetworks/ExampleVirtualNetwork/subnets/default"}, + VnetSubnetIDs: []string{"/subscriptions/123456-1234-1234-1234-123456789/resourceGroups/ExampleResourceGroup/providers/Microsoft.Network/virtualNetworks/ExampleVirtualNetwork/subnets/default"}, }, NodeCountLimits: &azure_np.NodeCountLimits{ MinCount: spotinst.Int(0), diff --git a/examples/service/ocean/providers/azure_np/nodegroup/create/main.go b/examples/service/ocean/providers/azure_np/nodegroup/create/main.go index 526e1efc..e64b07e4 100644 --- a/examples/service/ocean/providers/azure_np/nodegroup/create/main.go +++ b/examples/service/ocean/providers/azure_np/nodegroup/create/main.go @@ -53,6 +53,8 @@ func main() { OsType: spotinst.String("Windows"), OsSKU: spotinst.String("Windows2022"), KubernetesVersion: spotinst.String("1.26"), + PodSubnetIDs: []string{"/subscriptions/123456-1234-1234-1234-123456789/resourceGroups/ExampleResourceGroup/providers/Microsoft.Network/virtualNetworks/ExampleVirtualNetwork/subnets/default"}, + VnetSubnetIDs: []string{"/subscriptions/123456-1234-1234-1234-123456789/resourceGroups/ExampleResourceGroup/providers/Microsoft.Network/virtualNetworks/ExampleVirtualNetwork/subnets/default"}, }, NodeCountLimits: &azure_np.NodeCountLimits{ MinCount: spotinst.Int(0), diff --git a/service/ocean/providers/azure_np/common.go b/service/ocean/providers/azure_np/common.go index 9dee1476..02de3243 100644 --- a/service/ocean/providers/azure_np/common.go +++ b/service/ocean/providers/azure_np/common.go @@ -4,13 +4,15 @@ import "github.com/spotinst/spotinst-sdk-go/spotinst/util/jsonutil" // NodePoolProperties region type NodePoolProperties struct { - MaxPodsPerNode *int `json:"maxPodsPerNode,omitempty"` - EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"` - OsDiskSizeGB *int `json:"osDiskSizeGB,omitempty"` - OsDiskType *string `json:"osDiskType,omitempty"` - OsType *string `json:"osType,omitempty"` - OsSKU *string `json:"osSKU,omitempty"` - KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + MaxPodsPerNode *int `json:"maxPodsPerNode,omitempty"` + EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"` + OsDiskSizeGB *int `json:"osDiskSizeGB,omitempty"` + OsDiskType *string `json:"osDiskType,omitempty"` + OsType *string `json:"osType,omitempty"` + OsSKU *string `json:"osSKU,omitempty"` + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + PodSubnetIDs []string `json:"podSubnetIDs,omitempty"` + VnetSubnetIDs []string `json:"vnetSubnetIDs,omitempty"` forceSendFields []string nullFields []string @@ -71,6 +73,20 @@ func (o *NodePoolProperties) SetKubernetesVersion(v *string) *NodePoolProperties return o } +func (o *NodePoolProperties) SetPodSubnetIDs(v []string) *NodePoolProperties { + if o.PodSubnetIDs = v; o.PodSubnetIDs == nil { + o.nullFields = append(o.nullFields, "PodSubnetIDs") + } + return o +} + +func (o *NodePoolProperties) SetVnetSubnetIDs(v []string) *NodePoolProperties { + if o.VnetSubnetIDs = v; o.VnetSubnetIDs == nil { + o.nullFields = append(o.nullFields, "VnetSubnetIDs") + } + return o +} + // endregion // NodeCountLimits region