The seed Job is a pre-install hook, so on a first install it ran before any of the release's NetworkPolicies existed: unconfined for its run, and refused outright by a cluster that requires a deny-all over every pod. The lab's Kyverno policy does exactly that:
admission webhook "vpol.validate.kyverno.svc-fail" denied the request: Policy inbuxa-network-policy failed: every pod is under a deny-all NetworkPolicy
Every earlier lab run upgraded an existing release, so the policies were already there. The lab's first from-scratch run (lab/e2e.sh, coming in the lab repo) found it.
Fix: the deny-all and the jobs' policy are rendered a second time as pre-install,pre-upgrade,pre-rollback hooks at weight -20 (before the seed's ConfigMap at -5 and the upgrade's objects at -10), with before-hook-creation,hook-succeeded, so they go once the hooks succeed, when the release's own copies are created. The hook deny-all has no matchExpressions, as a deny-all over the whole release.
tools/check.sh all green locally (both Helm versions, kubeconform 1.35–1.37, kube-linter, helm-unittest with three new tests). The from-scratch lab run on this branch is going now; I'll add its result here.
The seed Job is a `pre-install` hook, so on a **first install** it ran before any of the release's NetworkPolicies existed: unconfined for its run, and refused outright by a cluster that requires a deny-all over every pod. The lab's Kyverno policy does exactly that:
> admission webhook "vpol.validate.kyverno.svc-fail" denied the request: Policy inbuxa-network-policy failed: every pod is under a deny-all NetworkPolicy
Every earlier lab run upgraded an existing release, so the policies were already there. The lab's first from-scratch run (`lab/e2e.sh`, coming in the lab repo) found it.
**Fix:** the deny-all and the jobs' policy are rendered a second time as `pre-install,pre-upgrade,pre-rollback` hooks at weight -20 (before the seed's ConfigMap at -5 and the upgrade's objects at -10), with `before-hook-creation,hook-succeeded`, so they go once the hooks succeed, when the release's own copies are created. The hook deny-all has no `matchExpressions`, as a deny-all over the whole release.
`tools/check.sh` all green locally (both Helm versions, kubeconform 1.35–1.37, kube-linter, helm-unittest with three new tests). The from-scratch lab run on this branch is going now; I'll add its result here.
The seed Job is a pre-install hook, so on a first install it ran before
any of the release's NetworkPolicies existed: unconfined, and refused by
a cluster that requires a deny-all over every pod (the lab's Kyverno
policy). The deny-all and the jobs' policy are now rendered a second time
as pre-install/pre-upgrade/pre-rollback hooks at weight -20, deleted once
the hooks succeed; by then the release's own copies are in place.
Found by the lab's first from-scratch run (lab/e2e.sh); every earlier run
upgraded an existing release.
Lab, from scratch on the bench with this branch (lab/down.sh && lab/e2e.sh): passed in 179 s: the seed ran under the hook deny-all, then mail in over SMTP and found over IMAPS, the webmail signed in across both replicas, the console signed in. Before this change the same run stopped at the seed with the Kyverno denial above.
Lab, from scratch on the bench with this branch (`lab/down.sh && lab/e2e.sh`): **passed in 179 s**: the seed ran under the hook deny-all, then mail in over SMTP and found over IMAPS, the webmail signed in across both replicas, the console signed in. Before this change the same run stopped at the seed with the Kyverno denial above.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The seed Job is a
pre-installhook, so on a first install it ran before any of the release's NetworkPolicies existed: unconfined for its run, and refused outright by a cluster that requires a deny-all over every pod. The lab's Kyverno policy does exactly that:Every earlier lab run upgraded an existing release, so the policies were already there. The lab's first from-scratch run (
lab/e2e.sh, coming in the lab repo) found it.Fix: the deny-all and the jobs' policy are rendered a second time as
pre-install,pre-upgrade,pre-rollbackhooks at weight -20 (before the seed's ConfigMap at -5 and the upgrade's objects at -10), withbefore-hook-creation,hook-succeeded, so they go once the hooks succeed, when the release's own copies are created. The hook deny-all has nomatchExpressions, as a deny-all over the whole release.tools/check.shall green locally (both Helm versions, kubeconform 1.35–1.37, kube-linter, helm-unittest with three new tests). The from-scratch lab run on this branch is going now; I'll add its result here.Lab, from scratch on the bench with this branch (
lab/down.sh && lab/e2e.sh): passed in 179 s: the seed ran under the hook deny-all, then mail in over SMTP and found over IMAPS, the webmail signed in across both replicas, the console signed in. Before this change the same run stopped at the seed with the Kyverno denial above.