Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
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
1 change: 1 addition & 0 deletions 1 linode_api4/objects/lke.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ class LKENodePool(DerivedBase):
# directly exposed in the node pool response.
"k8s_version": Property(mutable=True),
"update_strategy": Property(mutable=True),
"firewall_id": Property(mutable=True),
}

def _parse_raw_node(
Expand Down
1 change: 1 addition & 0 deletions 1 test/fixtures/lke_clusters_18881_pools_456.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"bar": "foo"
},
"label": "example-node-pool",
"firewall_id": 456,
"type": "g6-standard-4",
"disk_encryption": "enabled"
}
1 change: 1 addition & 0 deletions 1 test/fixtures/lke_clusters_18882_pools_789.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"tags": [],
"disk_encryption": "enabled",
"k8s_version": "1.31.1+lke1",
"firewall_id": 789,
"update_strategy": "rolling_update"
}
10 changes: 8 additions & 2 deletions 10 test/integration/models/lke/test_lke.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def lke_cluster_with_apl(test_linode_client):


@pytest.fixture(scope="session")
def lke_cluster_enterprise(test_linode_client):
def lke_cluster_enterprise(e2e_test_firewall, test_linode_client):
# We use the oldest version here so we can test upgrades
version = sorted(
v.id for v in test_linode_client.lke.tier("enterprise").versions()
Expand All @@ -153,6 +153,7 @@ def lke_cluster_enterprise(test_linode_client):
3,
k8s_version=version,
update_strategy="rolling_update",
firewall_id=e2e_test_firewall.id,
)
label = get_test_label() + "_cluster"

Expand Down Expand Up @@ -434,13 +435,18 @@ def test_lke_cluster_with_apl(lke_cluster_with_apl):
)


def test_lke_cluster_enterprise(test_linode_client, lke_cluster_enterprise):
def test_lke_cluster_enterprise(
e2e_test_firewall,
test_linode_client,
lke_cluster_enterprise,
):
lke_cluster_enterprise.invalidate()
assert lke_cluster_enterprise.tier == "enterprise"

pool = lke_cluster_enterprise.pools[0]
assert str(pool.k8s_version) == lke_cluster_enterprise.k8s_version.id
assert pool.update_strategy == "rolling_update"
assert pool.firewall_id == e2e_test_firewall.id

target_version = sorted(
v.id for v in test_linode_client.lke.tier("enterprise").versions()
Expand Down
4 changes: 4 additions & 0 deletions 4 test/unit/objects/lke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def test_get_pool(self):
assert pool.cluster_id == 18881
assert pool.type.id == "g6-standard-4"
assert pool.label == "example-node-pool"
assert pool.firewall_id == 456
assert pool.disk_encryption == InstanceDiskEncryptionType.enabled

assert pool.disks is not None
Expand Down Expand Up @@ -254,6 +255,7 @@ def test_lke_node_pool_update(self):
pool.tags = ["foobar"]
pool.count = 5
pool.label = "testing-label"
pool.firewall_id = 852
pool.autoscaler = {
"enabled": True,
"min": 2,
Expand Down Expand Up @@ -281,6 +283,7 @@ def test_lke_node_pool_update(self):
"labels": {
"updated-key": "updated-value",
},
"firewall_id": 852,
"taints": [
{
"key": "updated-key",
Expand Down Expand Up @@ -551,6 +554,7 @@ def test_cluster_enterprise(self):
assert pool.k8s_version == "1.31.1+lke1"
assert pool.update_strategy == "rolling_update"
assert pool.label == "enterprise-node-pool"
assert pool.firewall_id == 789

def test_lke_tiered_version(self):
version = TieredKubeVersion(self.client, "1.32", "standard")
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.