Skip to content

Commit

Permalink
Update Kubernetes versions (#299)
Browse files Browse the repository at this point in the history
Co-authored-by: jacobtomlinson <jacobtomlinson@users.noreply.github.com>
Co-authored-by: Jacob Tomlinson <jacob@tomlinson.email>
  • Loading branch information
3 people authored Feb 2, 2024
1 parent de17205 commit 8070404
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-kr8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
kubernetes-version: ["1.29.0"]
kubernetes-version: ["1.29.1"]
include:
- python-version: '3.10'
kubernetes-version: 1.28.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-kubectl-ng.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
kubernetes-version: ["1.29.0"]
kubernetes-version: ["1.29.1"]
include:
- python-version: '3.10'
kubernetes-version: 1.28.0
Expand Down
19 changes: 12 additions & 7 deletions ci/update-kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,22 @@ def get_versions():
data.sort(key=lambda x: x["eol"], reverse=True)

print("Loading Kubernetes tags from https://hub.docker.com/r/kindest/node/tags...")
with urllib.request.urlopen(
"https://hub.docker.com/v2/repositories/kindest/node/tags"
) as url:
container_tags = json.load(url)

container_tags = []
next_url = "https://hub.docker.com/v2/repositories/kindest/node/tags"
while next_url:
with urllib.request.urlopen(next_url) as url:
results = json.load(url)
container_tags += results["results"]
if "next" in results and results["next"]:
next_url = results["next"]
else:
next_url = None

for version in data:
try:
version["latest_kind_container"] = [
x["name"]
for x in container_tags["results"]
if version["cycle"] in x["name"]
x["name"] for x in container_tags if version["cycle"] in x["name"]
][0][1:]
except IndexError:
version["latest_kind_container"] = None
Expand Down

0 comments on commit 8070404

Please sign in to comment.