Files
Myasnikov Daniil 9de1f16cb0 fix(cozystack-basics): gate the hostname VAP policies on the VAP API
Backport of #3409 to release-1.5.

gateway-hostname-policy.yaml and route-hostname-policy.yaml rendered
their ValidatingAdmissionPolicy and binding documents unconditionally,
so installing the chart against an API server that does not serve
admissionregistration.k8s.io/v1/ValidatingAdmissionPolicy failed.
Guard both on the capability, matching the existing pattern in
packages/core/platform/templates/deletion-protection.yaml, and declare
the capability in the two rendering test suites so they keep exercising
the policies.

hostname-policies-capability-gate_test.yaml pins the absent-API case at
suite level, since helm-unittest merges per-test capabilities into the
suite's rather than replacing them.

The upstream change also gated a third template,
ingress-hostname-policy.yaml. That legacy-Ingress hostname policy
landed on main in d89ad7069 and was never backported, so it does not
exist on release-1.5 and is deliberately excluded here: importing it
would ship an unreviewed admission policy that starts rejecting tenant
Ingress hostnames in a patch release.

Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-08-17 17:52:25 +05:00
..
2026-05-25 17:07:02 +03:00