Kyverno incorrectly blocks the canary deployment of the image produced by the sample-pipeline
Current Behavior
The pod for the picalc deployment is never created in the prod namespace.
Inspecting the kyverno logs yields the following warning message:
I0407 14:48:47.004013 1 event.go:294] "Event occurred" object="attest-code-review" fieldPath="" kind="ClusterPolicy" apiVersion="kyverno.io/v1" type="Warning" reason="PolicyViolation" message=<
Pod prod/: [attest-code-review] fail (blocked); failed to verify image ttl.sh/0198a0cce14eb56330031c3d351561fc/example-sample@sha256:31caf278e83a77d1bab5255e9fca3ebec4aea1f2fe03624561504d7fa224272d: no matching attestations:
no certificate found on attestation
no certificate found on attestation
>
The canary deploy should yield a running pod, e.g.:
$ kubectl get all -n prod
NAME READY STATUS RESTARTS AGE
pod/picalc-576dd6b788-sszmh 1/1 Running 0 32s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/picalc NodePort 10.107.77.128 <none> 8080:30907/TCP 37s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/picalc 1/1 1 1 38s
NAME DESIRED CURRENT READY AGE
replicaset.apps/picalc-576dd6b788 1 1 1 38s
Steps to Reproduce
make setup-frsca
make example-sample-pipeline
Context
This issue is not visible on the main CI build because it uses an internal registry instead of ttl.sh. The current attest-code-review policy does not have entry for the internal registry.
Bug Report
Kyverno incorrectly blocks the canary deployment of the image produced by the
sample-pipeline
Current Behavior
The pod for the
picalc
deployment is never created in theprod
namespace.Inspecting the kyverno logs yields the following warning message:
But the following checks are both successful:
Expected Behavior
The canary deploy should yield a running pod, e.g.:
Steps to Reproduce
Context
This issue is not visible on the main CI build because it uses an internal registry instead of
ttl.sh
. The currentattest-code-review
policy does not have entry for the internal registry.Your Environment