Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions linode_api4/objects/lke.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Base,
DerivedBase,
Instance,
InstanceDiskEncryptionType,
JSONObject,
MappedObject,
Property,
Expand Down Expand Up @@ -422,6 +423,9 @@ def node_pool_create(
] = None,
update_strategy: Optional[str] = None,
label: str = None,
disk_encryption: Optional[
Union[str, InstanceDiskEncryptionType]
] = None,
**kwargs,
):
"""
Expand All @@ -443,6 +447,9 @@ def node_pool_create(
:param update_strategy: The strategy to use when updating this node pool.
NOTE: This field is specific to enterprise clusters.
:type update_strategy: str
:param disk_encryption: Local disk encryption setting for this LKE node pool.
One of 'enabled' or 'disabled'. Defaults to 'disabled'.
:type disk_encryption: str or InstanceDiskEncryptionType
:param kwargs: Any other arguments to pass to the API. See the API docs
for possible values.

Expand All @@ -459,6 +466,7 @@ def node_pool_create(
"taints": taints,
"k8s_version": k8s_version,
"update_strategy": update_strategy,
"disk_encryption": disk_encryption,
}
params.update(kwargs)

Expand Down
15 changes: 15 additions & 0 deletions test/integration/models/lke/test_lke.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,21 @@ def _to_comparable(p: LKENodePool) -> Dict[str, Any]:
)


def test_node_pool_create_with_disk_encryption(test_linode_client, lke_cluster):
node_type = test_linode_client.linode.types()[1]

pool = lke_cluster.node_pool_create(
node_type,
1,
disk_encryption=InstanceDiskEncryptionType.enabled,
)

try:
assert pool.disk_encryption == InstanceDiskEncryptionType.enabled
finally:
pool.delete()


def test_cluster_dashboard_url_view(lke_cluster):
cluster = lke_cluster

Expand Down
Loading