1414 Region ,
1515 Type ,
1616)
17+ from linode_api4 .objects .base import _flatten_request_body_recursive
1718from linode_api4 .util import drop_null_keys
1819
1920
@@ -193,6 +194,9 @@ class LKENodePool(DerivedBase):
193194 "tags" : Property (mutable = True , unordered = True ),
194195 "labels" : Property (mutable = True ),
195196 "taints" : Property (mutable = True ),
197+ # Enterprise-specific properties
198+ "k8s_version" : Property (mutable = True ),
199+ "update_strategy" : Property (mutable = True ),
196200 }
197201
198202 def _parse_raw_node (
@@ -404,6 +408,10 @@ def node_pool_create(
404408 node_count : int ,
405409 labels : Optional [Dict [str , str ]] = None ,
406410 taints : List [Union [LKENodePoolTaint , Dict [str , Any ]]] = None ,
411+ k8s_version : Optional [
412+ Union [str , KubeVersion , TieredKubeVersion ]
413+ ] = None ,
414+ update_strategy : Optional [str ] = None ,
407415 ** kwargs ,
408416 ):
409417 """
@@ -418,7 +426,13 @@ def node_pool_create(
418426 :param labels: A dict mapping labels to their values to apply to this pool.
419427 :type labels: Dict[str, str]
420428 :param taints: A list of taints to apply to this pool.
421- :type taints: List of :any:`LKENodePoolTaint` or dict
429+ :type taints: List of :any:`LKENodePoolTaint` or dict.
430+ :param k8s_version: The Kubernetes version to use for this pool.
431+ NOTE: This field is specific to enterprise clusters.
432+ :type k8s_version: str, KubeVersion, or TieredKubeVersion
433+ :param update_strategy: The strategy to use when updating this node pool.
434+ NOTE: This field is specific to enterprise clusters.
435+ :type update_strategy: str
422436 :param kwargs: Any other arguments to pass to the API. See the API docs
423437 for possible values.
424438
@@ -428,6 +442,10 @@ def node_pool_create(
428442 params = {
429443 "type" : node_type ,
430444 "count" : node_count ,
445+ "labels" : labels ,
446+ "taints" : taints ,
447+ "k8s_version" : k8s_version ,
448+ "update_strategy" : update_strategy ,
431449 }
432450
433451 if labels is not None :
@@ -439,7 +457,9 @@ def node_pool_create(
439457 params .update (kwargs )
440458
441459 result = self ._client .post (
442- "{}/pools" .format (LKECluster .api_endpoint ), model = self , data = params
460+ "{}/pools" .format (LKECluster .api_endpoint ),
461+ model = self ,
462+ data = drop_null_keys (_flatten_request_body_recursive (params )),
443463 )
444464 self .invalidate ()
445465
0 commit comments