diff --git a/examples/service/ocean/providers/azure_np/create/main.go b/examples/service/ocean/providers/azure_np/create/main.go index 31134088..edfd1192 100644 --- a/examples/service/ocean/providers/azure_np/create/main.go +++ b/examples/service/ocean/providers/azure_np/create/main.go @@ -75,6 +75,7 @@ func main() { OsDiskType: spotinst.String("Managed"), OsType: spotinst.String("Windows"), OsSKU: spotinst.String("Windows2019"), + KubernetesVersion: spotinst.String("1.26"), }, 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 458806ff..526e1efc 100644 --- a/examples/service/ocean/providers/azure_np/nodegroup/create/main.go +++ b/examples/service/ocean/providers/azure_np/nodegroup/create/main.go @@ -52,6 +52,7 @@ func main() { OsDiskType: spotinst.String("Managed"), OsType: spotinst.String("Windows"), OsSKU: spotinst.String("Windows2022"), + KubernetesVersion: spotinst.String("1.26"), }, 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 7b8046d3..9dee1476 100644 --- a/service/ocean/providers/azure_np/common.go +++ b/service/ocean/providers/azure_np/common.go @@ -10,6 +10,7 @@ type NodePoolProperties struct { OsDiskType *string `json:"osDiskType,omitempty"` OsType *string `json:"osType,omitempty"` OsSKU *string `json:"osSKU,omitempty"` + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` forceSendFields []string nullFields []string @@ -63,6 +64,13 @@ func (o *NodePoolProperties) SetOsSKU(v *string) *NodePoolProperties { return o } +func (o *NodePoolProperties) SetKubernetesVersion(v *string) *NodePoolProperties { + if o.KubernetesVersion = v; o.KubernetesVersion == nil { + o.nullFields = append(o.nullFields, "KubernetesVersion") + } + return o +} + // endregion // NodeCountLimits region