-
Notifications
You must be signed in to change notification settings - Fork 11
Add Envoy Gateway compatibility matrix #3841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| icon: https://raw.githubusercontent.com/envoyproxy/gateway/main/site/static/icons/logo.svg | ||
| git_url: https://github.com/envoyproxy/gateway | ||
| release_url: https://github.com/envoyproxy/gateway/releases/tag/v{vsn} | ||
| readme_url: https://gateway.envoyproxy.io/news/releases/matrix/ | ||
| helm_repository_url: oci://docker.io/envoyproxy/gateway-helm | ||
| chart_name: gateway-helm | ||
| versions: | ||
| - version: 1.8.0 | ||
| kube: ['1.35', '1.34', '1.33', '1.32'] | ||
| requirements: [] | ||
| chart_version: 1.8.0 | ||
| images: ['docker.io/envoyproxy/gateway:v1.8.0'] | ||
| incompatibilities: [] | ||
| - version: 1.7.0 | ||
| kube: ['1.35', '1.34', '1.33', '1.32'] | ||
| requirements: [] | ||
| chart_version: 1.7.0 | ||
| images: ['docker.io/envoyproxy/gateway:v1.7.0'] | ||
| incompatibilities: [] | ||
| - version: 1.6.0 | ||
| kube: ['1.33', '1.32', '1.31', '1.30'] | ||
| requirements: [] | ||
| chart_version: 1.6.0 | ||
| images: ['docker.io/envoyproxy/gateway:v1.6.0'] | ||
| incompatibilities: [] | ||
| - version: 1.5.0 | ||
| kube: ['1.33', '1.32', '1.31', '1.30'] | ||
| requirements: [] | ||
| chart_version: 1.5.0 | ||
| images: ['docker.io/envoyproxy/gateway:v1.5.0'] | ||
| incompatibilities: [] | ||
| - version: 1.4.0 | ||
| kube: ['1.33', '1.32', '1.31', '1.30'] | ||
| requirements: [] | ||
| chart_version: 1.4.0 | ||
| images: ['docker.io/envoyproxy/gateway:v1.4.0'] | ||
| incompatibilities: [] | ||
| - version: 1.3.0 | ||
| kube: ['1.32', '1.31', '1.30', '1.29'] | ||
| requirements: [] | ||
| chart_version: 1.3.0 | ||
| images: ['docker.io/envoyproxy/gateway:v1.3.0'] | ||
| incompatibilities: [] | ||
| - version: 1.2.0 | ||
| kube: ['1.31', '1.30', '1.29', '1.28'] | ||
| requirements: [] | ||
| chart_version: 1.2.0 | ||
| images: ['docker.io/envoyproxy/gateway:v1.2.0'] | ||
| incompatibilities: [] | ||
| - version: 1.1.0 | ||
| kube: ['1.30', '1.29', '1.28', '1.27'] | ||
| requirements: [] | ||
| chart_version: 1.1.0 | ||
| images: ['docker.io/envoyproxy/gateway:v1.1.0'] | ||
| incompatibilities: [] | ||
| - version: 1.0.0 | ||
| kube: ['1.29', '1.28', '1.27', '1.26'] | ||
| requirements: [] | ||
| chart_version: 1.0.0 | ||
| images: ['docker.io/envoyproxy/gateway:v1.0.0'] | ||
| incompatibilities: [] | ||
| - version: 0.6.0 | ||
| kube: ['1.28', '1.27', '1.26'] | ||
| requirements: [] | ||
| chart_version: 0.6.0 | ||
| images: ['docker.io/envoyproxy/gateway:v0.6.0'] | ||
| incompatibilities: [] | ||
| - version: 0.5.0 | ||
| kube: ['1.27', '1.26', '1.25'] | ||
| requirements: [] | ||
| chart_version: 0.5.0 | ||
| images: ['docker.io/envoyproxy/gateway:v0.5.0'] | ||
| incompatibilities: [] | ||
| - version: 0.4.0 | ||
| kube: ['1.27', '1.26', '1.25'] | ||
| requirements: [] | ||
| chart_version: 0.4.0 | ||
| images: ['docker.io/envoyproxy/gateway:v0.4.0'] | ||
| incompatibilities: [] | ||
| - version: 0.3.0 | ||
| kube: ['1.26', '1.25', '1.24'] | ||
| requirements: [] | ||
| chart_version: 0.3.0 | ||
| images: ['docker.io/envoyproxy/gateway:v0.3.0'] | ||
| incompatibilities: [] | ||
| - version: 0.2.0 | ||
| kube: ['1.24'] | ||
| requirements: [] | ||
| chart_version: 0.2.0 | ||
| images: ['docker.io/envoyproxy/gateway:v0.2.0'] | ||
| incompatibilities: [] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| names: | ||
| - envoy-gateway | ||
| - argo-rollouts | ||
| - aws-ebs-csi-driver | ||
| - aws-efs-csi-driver | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from collections import OrderedDict | ||
|
|
||
| from bs4 import BeautifulSoup | ||
|
|
||
| from utils import fetch_page, get_chart_images, print_error, update_compatibility_info | ||
|
|
||
|
|
||
| APP_NAME = "envoy-gateway" | ||
| COMPATIBILITY_URL = "https://gateway.envoyproxy.io/news/releases/matrix/" | ||
| TARGET_FILE = f"../../static/compatibilities/{APP_NAME}.yaml" | ||
| CHART_URL = "oci://docker.io/envoyproxy/gateway-helm" | ||
| CHART_NAME = "gateway-helm" | ||
|
|
||
|
|
||
| def _decode(content): | ||
| return content.decode("utf-8", errors="replace") if isinstance(content, bytes) else content | ||
|
|
||
|
|
||
| def _clean_version(value: str) -> str: | ||
| version = value.strip().lstrip("v") | ||
| if version == "latest": | ||
| return version | ||
| if version and version.count(".") == 1: | ||
| return f"{version}.0" | ||
| return version | ||
|
|
||
|
|
||
| def _clean_kube_version(value: str) -> str: | ||
| return value.strip().lstrip("v") | ||
|
|
||
|
|
||
| def _parse_kube_versions(value: str) -> list[str]: | ||
| versions = [] | ||
| for raw_version in value.split(","): | ||
| version = _clean_kube_version(raw_version) | ||
| if version: | ||
| versions.append(version) | ||
| return versions | ||
|
|
||
|
|
||
| def _find_compatibility_table(soup: BeautifulSoup): | ||
| required_headers = [ | ||
| "Envoy Gateway version", | ||
| "Kubernetes version", | ||
| ] | ||
|
|
||
| for table in soup.find_all("table"): | ||
| headers = [th.get_text(" ", strip=True) for th in table.find_all("th")] | ||
| if all(header in headers for header in required_headers): | ||
| return table, headers | ||
| return None, [] | ||
|
|
||
|
|
||
| def _chart_images(chart_version: str) -> list[str]: | ||
| return get_chart_images(CHART_URL, CHART_NAME, chart_version) or [] | ||
|
|
||
|
|
||
| def scrape(): | ||
| content = fetch_page(COMPATIBILITY_URL) | ||
| if not content: | ||
| print_error("Failed to fetch Envoy Gateway compatibility matrix.") | ||
| return | ||
|
|
||
| soup = BeautifulSoup(_decode(content), "html.parser") | ||
| table, headers = _find_compatibility_table(soup) | ||
| if not table: | ||
| print_error("Envoy Gateway compatibility table not found.") | ||
| return | ||
|
|
||
| gateway_idx = headers.index("Envoy Gateway version") | ||
| kube_idx = headers.index("Kubernetes version") | ||
|
Comment on lines
+70
to
+73
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| versions = [] | ||
| for row in table.find_all("tr")[1:]: | ||
| cells = [td.get_text(" ", strip=True) for td in row.find_all("td")] | ||
| if len(cells) <= max(gateway_idx, kube_idx): | ||
| continue | ||
|
|
||
| version = _clean_version(cells[gateway_idx]) | ||
| if not version or version == "latest": | ||
| continue | ||
|
|
||
| kube_versions = _parse_kube_versions(cells[kube_idx]) | ||
| if not kube_versions: | ||
| continue | ||
|
|
||
| versions.append( | ||
| OrderedDict( | ||
| [ | ||
| ("version", version), | ||
| ("kube", kube_versions), | ||
| ("requirements", []), | ||
| ("chart_version", version), | ||
| ("images", _chart_images(version)), | ||
| ("incompatibilities", []), | ||
| ] | ||
| ) | ||
| ) | ||
|
|
||
| if not versions: | ||
| print_error("No Envoy Gateway compatibility rows parsed.") | ||
| return | ||
|
|
||
| update_compatibility_info(TARGET_FILE, versions) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should be able to get image versions from the chart at the very least here, and i'm pretty sure the helpers also can work with oci to infer chart versions.