Strategic-merge patches and a kustomization over the checksum-pinned upstream assets, a runbook with the rollout-deadlock and HPA lessons, offline tests, and RAIL-KNATIVE-WP-0002 with the railiance-cluster installer handoff as a wait task. Verified read-only against live. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 63291@bnt-lap001 Assistant-Session: 8bd77868-ca68-4f49-bb1e-d539ecc0d703
33 lines
1.4 KiB
Python
33 lines
1.4 KiB
Python
from pathlib import Path
|
|
import yaml
|
|
|
|
ROOT = Path(__file__).parents[1]
|
|
SUBSTRATE = ROOT / "substrate/v1.22.0"
|
|
|
|
# Live on railiance01 since 2026-09-21; see docs/substrate-runbook.md.
|
|
DECLARED = {
|
|
("knative-serving", "activator", "activator"): "50m",
|
|
("knative-serving", "autoscaler", "autoscaler"): "30m",
|
|
("knative-serving", "controller", "controller"): "30m",
|
|
("knative-serving", "webhook", "webhook"): "30m",
|
|
("knative-serving", "net-kourier-controller", "controller"): "30m",
|
|
("kourier-system", "3scale-kourier-gateway", "kourier-gateway"): "50m",
|
|
}
|
|
|
|
|
|
def test_patches_declare_exactly_the_cpu_requests():
|
|
found = {}
|
|
for doc in yaml.safe_load_all((SUBSTRATE / "cpu-requests.patch.yaml").read_text()):
|
|
assert doc["kind"] == "Deployment"
|
|
(container,) = doc["spec"]["template"]["spec"]["containers"]
|
|
# Only CPU requests: no limits, no memory, nothing else.
|
|
assert container["resources"] == {"requests": {"cpu": container["resources"]["requests"]["cpu"]}}
|
|
key = (doc["metadata"]["namespace"], doc["metadata"]["name"], container["name"])
|
|
found[key] = container["resources"]["requests"]["cpu"]
|
|
assert found == DECLARED
|
|
|
|
|
|
def test_kustomization_patches_the_pinned_assets():
|
|
k = yaml.safe_load((SUBSTRATE / "kustomization.yaml").read_text())
|
|
assert k["resources"] == ["core.yaml", "kourier.yaml"]
|
|
assert k["patches"] == [{"path": "cpu-requests.patch.yaml"}]
|