From 4113707131aafdfdf8ab46932971bd340a78eea7 Mon Sep 17 00:00:00 2001 From: mona lisa Date: Mon, 13 Oct 2025 19:46:01 +0530 Subject: [PATCH 1/2] Update version-support.md via update-kubernetes script --- ci/update-kubernetes.py | 52 +++++++++++++++++++++++++++++++++++++++++ docs/version-support.md | 11 +++++++++ 2 files changed, 63 insertions(+) diff --git a/ci/update-kubernetes.py b/ci/update-kubernetes.py index d57b71f..1d8e460 100755 --- a/ci/update-kubernetes.py +++ b/ci/update-kubernetes.py @@ -66,6 +66,7 @@ def get_kubernetes_oss_versions(): "cycle": x["cycle"], "latest_version": x["latest"], "eol": get_support_date(x), + "support_source": "OSS Standard Support", } for x in data if has_eol(x) @@ -137,6 +138,23 @@ def extend_versions(versions, extended_versions, provider): f"{provider} support date {extended_version['eol']:%Y-%m-%d}" ) version["eol"] = extended_version["eol"] + existing_source = version.get("support_source", "OSS Standard Support") + + def format_sources(existing, new): + items = [ + s.strip().lstrip("-").strip() + for s in existing.replace("
", ",").split(",") + if s.strip() + ] + # Add new provider if not already present + if new not in items: + items.append(new) + return "
- " + "
- ".join(items) + + if "Extended Support" in existing_source and provider not in existing_source: + version["support_source"] = format_sources(existing_source, provider) + elif existing_source == "OSS Standard Support": + version["support_source"] = f"- {provider} Extended Support" return versions @@ -236,6 +254,38 @@ def update_version_support(versions): ) Path("kr8s/_constants.py").write_text(version_support) +def update_docs_table(versions, doc_path): + """Generates and inserts a Markdown table of supported versions into a doc file.""" + print(f"Updating support table in {doc_path}...") + doc_path = Path(doc_path) + + # 1. Build the Markdown table + table_lines = [ + "| Kubernetes Version | Support Until | Source of Support |", + "|--------------------|---------------|-------------------|", + ] + for version in versions: + eol_date = version["eol"].strftime("%Y-%m-%d") + source = version.get("support_source", "OSS Standard Support") + table_lines.append(f"| {version['cycle']} | {eol_date} | {source} |") + + table = "\n".join(table_lines) + + # 2. Read the doc file + content = doc_path.read_text() + + # 3. Replace content between markers + new_content = re.sub( + r"()(.*?)()", + f"\\1\n{table}\n\\3", + content, + flags=re.DOTALL, + ) + + # 4. Write updated content + doc_path.write_text(new_content) + print("Version support table updated successfully!") + def main(): versions = get_versions() @@ -253,6 +303,8 @@ def main(): update_badges("README.md", versions) update_badges("docs/index.md", versions) update_version_support(versions) + update_docs_table(versions, "docs/version-support.md") + else: print("DEBUG env var set, skipping file updates") diff --git a/docs/version-support.md b/docs/version-support.md index 7d91384..7bfe4c2 100644 --- a/docs/version-support.md +++ b/docs/version-support.md @@ -8,6 +8,17 @@ For each version of Kubernetes we check the following end of life dates: - [Amazon EKS End of Support](https://endoflife.date/amazon-eks) - [Azure Kubernetes Service End of Support](https://endoflife.date/azure-kubernetes-service) + +| Kubernetes Version | Support Until | Source of Support | +|--------------------|---------------|-------------------| +| 1.33 | 2027-07-29 |
- Azure AKS Extended Support
- Amazon EKS | +| 1.32 | 2027-03-31 | - Azure AKS Extended Support | +| 1.31 | 2026-11-30 | - Azure AKS Extended Support | +| 1.30 | 2026-07-31 | - Azure AKS Extended Support | +| 1.29 | 2026-04-30 | - Azure AKS Extended Support | +| 1.28 | 2026-02-28 | - Azure AKS Extended Support | + + Once a version has reached end of life from all providers we remove it from our CI/testing matrix. Typically new versions are released 3-4 times a year and each version receives 12-15 months of support. From 5adbdd3ef992226a858b8278fb7e3b7b6e129fb9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 14:35:09 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ci/update-kubernetes.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ci/update-kubernetes.py b/ci/update-kubernetes.py index 1d8e460..f8d4e47 100755 --- a/ci/update-kubernetes.py +++ b/ci/update-kubernetes.py @@ -138,8 +138,10 @@ def extend_versions(versions, extended_versions, provider): f"{provider} support date {extended_version['eol']:%Y-%m-%d}" ) version["eol"] = extended_version["eol"] - existing_source = version.get("support_source", "OSS Standard Support") - + existing_source = version.get( + "support_source", "OSS Standard Support" + ) + def format_sources(existing, new): items = [ s.strip().lstrip("-").strip() @@ -151,8 +153,13 @@ def format_sources(existing, new): items.append(new) return "
- " + "
- ".join(items) - if "Extended Support" in existing_source and provider not in existing_source: - version["support_source"] = format_sources(existing_source, provider) + if ( + "Extended Support" in existing_source + and provider not in existing_source + ): + version["support_source"] = format_sources( + existing_source, provider + ) elif existing_source == "OSS Standard Support": version["support_source"] = f"- {provider} Extended Support" return versions @@ -254,6 +261,7 @@ def update_version_support(versions): ) Path("kr8s/_constants.py").write_text(version_support) + def update_docs_table(versions, doc_path): """Generates and inserts a Markdown table of supported versions into a doc file.""" print(f"Updating support table in {doc_path}...")