Coverage for gco / k8s_api_versions.py: 100.00%
4 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-10-28 16:19 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-10-28 16:19 +0000
1"""Kubernetes API group/version pins shared by the GCO services.
3One source for API versions that more than one service calls through the
4generic ``CustomObjectsApi`` (which takes the group and version as plain
5strings, so nothing in the client library pins them). Standard library only:
6every service image copies ``gco/`` wholesale, so anything imported here is
7imported by every service.
8"""
10METRICS_API_GROUP = "metrics.k8s.io"
11"""API group of the Kubernetes resource-metrics API served by metrics-server."""
13METRICS_API_VERSION = "v1beta1"
14"""Version of the resource-metrics API the services read.
16``metrics.k8s.io/v1`` is GA in Kubernetes 1.37, but the metrics-server
17add-on GCO pins (``EKS_ADDON_METRICS_SERVER`` in ``gco/stacks/constants.py``,
18a ``v0.9.x`` build) registers only ``v1beta1`` in its ``pkg/api/install.go``;
19upstream ``master`` registers ``v1`` as well, so the first release to carry it
20is expected to be ``v0.10.x``. Flip this to ``"v1"`` once the pinned add-on is
21such a release (``tests/test_k8s_api_versions.py`` fails on a ``v0.10+`` pin
22while this still says ``v1beta1``, as the reminder). The RBAC grants in
23``lambda/kubectl-applier-simple/manifests/02-rbac.yaml`` name only the group,
24so they need no change when the version moves.
25"""