Skip to content

Commit 750022c

Browse files
kr8s-botjacobtomlinsonLillecarl
authored
Update Kubernetes version from 1.33.4 to 1.34.0 (#692)
Co-authored-by: jacobtomlinson <[email protected]> Co-authored-by: Carl <[email protected]>
1 parent 5b980ae commit 750022c

File tree

7 files changed

+25
-15
lines changed

7 files changed

+25
-15
lines changed

.github/workflows/test-kr8s.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
26-
kubernetes-version: ["1.33.4"]
26+
kubernetes-version: ["1.34.0"]
2727
include:
28+
- python-version: "3.14"
29+
kubernetes-version: 1.33.4
2830
- python-version: "3.14"
2931
kubernetes-version: 1.32.8
3032
- python-version: "3.14"
@@ -65,7 +67,7 @@ jobs:
6567
matrix:
6668
# Test the minimal and maximal Python versions only
6769
python-version: ["3.9", "3.14"]
68-
kubernetes-version: ["1.33.4"]
70+
kubernetes-version: ["1.34.0"]
6971
steps:
7072
- uses: actions/checkout@v2
7173
- uses: actions/setup-python@v2

.github/workflows/test-kubectl-ng.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
24-
kubernetes-version: ["1.33.4"]
24+
kubernetes-version: ["1.34.0"]
2525
include:
26+
- python-version: "3.14"
27+
kubernetes-version: 1.33.4
2628
- python-version: "3.14"
2729
kubernetes-version: 1.32.8
2830
- python-version: "3.14"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![EffVer Versioning](https://img.shields.io/badge/version_scheme-EffVer-0097a7)](https://jacobtomlinson.dev/effver)
88
[![PyPI](https://img.shields.io/pypi/v/kr8s)](https://pypi.org/project/kr8s/)
99
[![Python Version Support](https://img.shields.io/badge/Python%20support-3.9%7C3.10%7C3.11%7C3.12%7C3.13%7C3.14-blue)](https://pypi.org/project/kr8s/)
10-
[![Kubernetes Version Support](https://img.shields.io/badge/Kubernetes%20support-1.28%7C1.29%7C1.30%7C1.31%7C1.32%7C1.33-blue)](https://docs.kr8s.org/en/stable/installation.html#supported-kubernetes-versions)
10+
[![Kubernetes Version Support](https://img.shields.io/badge/Kubernetes%20support-1.28%7C1.29%7C1.30%7C1.31%7C1.32%7C1.33%7C1.34-blue)](https://docs.kr8s.org/en/stable/installation.html#supported-kubernetes-versions)
1111
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/kr8s)](https://pypi.org/project/kr8s/)
1212
[![PyPI - License](https://img.shields.io/pypi/l/kr8s)](https://pypi.org/project/kr8s/)
1313

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![EffVer Versioning](https://img.shields.io/badge/version_scheme-EffVer-0097a7)](https://jacobtomlinson.dev/effver)
44
[![PyPI](https://img.shields.io/pypi/v/kr8s)](https://pypi.org/project/kr8s/)
55
[![Python Version Support](https://img.shields.io/badge/Python%20support-3.9%7C3.10%7C3.11%7C3.12%7C3.13%7C3.14-blue)](https://pypi.org/project/kr8s/)
6-
[![Kubernetes Version Support](https://img.shields.io/badge/Kubernetes%20support-1.28%7C1.29%7C1.30%7C1.31%7C1.32%7C1.33-blue)](https://docs.kr8s.org/en/stable/installation.html#supported-kubernetes-versions)
6+
[![Kubernetes Version Support](https://img.shields.io/badge/Kubernetes%20support-1.28%7C1.29%7C1.30%7C1.31%7C1.32%7C1.33%7C1.34-blue)](https://docs.kr8s.org/en/stable/installation.html#supported-kubernetes-versions)
77
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/kr8s)](https://pypi.org/project/kr8s/)
88
[![PyPI - License](https://img.shields.io/pypi/l/kr8s)](https://pypi.org/project/kr8s/)
99
<iframe src="https://ghbtns.com/github-btn.html?user=kr8s-org&repo=kr8s&type=star&count=true" frameborder="0" scrolling="0" width="150" height="20" title="GitHub"></iframe>

kr8s/_config.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,13 @@ def raw(self) -> dict:
8787
data = {
8888
"apiVersion": "v1",
8989
"kind": "Config",
90-
"preferences": self.preferences,
9190
"clusters": self.clusters,
9291
"users": self.users,
9392
"contexts": self.contexts,
9493
"current-context": self.current_context,
9594
}
95+
if self.preferences:
96+
data["preferences"] = self.preferences # type: ignore[assignment]
9697
if self.extensions:
9798
data["extensions"] = self.extensions
9899
return data
@@ -174,7 +175,7 @@ async def unset(self, pointer: str) -> None:
174175
pass
175176

176177
@property
177-
def preferences(self) -> list[dict]:
178+
def preferences(self) -> dict:
178179
return self._configs[0].preferences
179180

180181
@property
@@ -333,21 +334,21 @@ def raw(self) -> dict:
333334
return self._raw
334335

335336
@property
336-
def preferences(self) -> list[dict]:
337-
return self._raw["preferences"]
337+
def preferences(self) -> dict:
338+
return self._raw.get("preferences", {})
338339

339340
@property
340341
def clusters(self) -> list[dict]:
341-
return self._raw["clusters"]
342+
return self._raw.get("clusters", [])
342343

343344
@property
344345
def users(self) -> list[dict]:
345-
return self._raw["users"]
346+
return self._raw.get("users", [])
346347

347348
@property
348349
def contexts(self) -> list[dict]:
349-
return self._raw["contexts"]
350+
return self._raw.get("contexts", [])
350351

351352
@property
352353
def extensions(self) -> list[dict]:
353-
return self._raw["extensions"] if "extensions" in self._raw else []
354+
return self._raw.get("extensions", [])

kr8s/_constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
from packaging.version import parse as parse_version
44

55
KUBERNETES_MINIMUM_SUPPORTED_VERSION = parse_version("1.28")
6-
KUBERNETES_MAXIMUM_SUPPORTED_VERSION = parse_version("1.33")
6+
KUBERNETES_MAXIMUM_SUPPORTED_VERSION = parse_version("1.34")

kr8s/tests/test_config.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ async def test_kubeconfig_from_dict(temp_kubeconfig, cls):
5151
with open(temp_kubeconfig) as fh:
5252
config = yaml.safe_load(fh)
5353
kubeconfig = await cls(config)
54-
assert kubeconfig.raw == config
54+
assert kubeconfig.raw["clusters"] == config["clusters"]
55+
assert kubeconfig.raw["users"] == config["users"]
56+
assert kubeconfig.raw["contexts"] == config["contexts"]
57+
# Preferences and extensions are optional
58+
assert kubeconfig.raw.get("preferences", {}) == config.get("preferences", {})
59+
assert kubeconfig.raw.get("extensions", []) == config.get("extensions", [])
5560

5661

5762
@pytest.mark.parametrize("cls", [KubeConfig, KubeConfigSet])

0 commit comments

Comments
 (0)