Repository navigation
Commit b49ee24
committed
fix(cozystack-basics): gate gateway-hostname-policy with matchConditions
Address review feedback from kitsunoff on
packages/system/cozystack-basics/templates/gateway-hostname-policy.yaml:22:
the first VAP had no matchConditions, so with failurePolicy: Fail and a
validation expression of variables.tenantHost != "", any Gateway in a
namespace without the namespace.cozystack.io/host label (kube-system,
default, any non-cozystack namespace) was rejected cluster-wide, including
clusters running with gateway.enabled: false.
Hoist the namespace-label precondition into matchConditions so the VAP only
fires for cozystack-managed tenant namespaces, then simplify the validation
body — the explicit tenantHost-nonempty check becomes redundant.
Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>1 parent fc86269 commit b49ee24
1 file changed
Lines changed: 13 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
0 commit comments