-
Notifications
You must be signed in to change notification settings - Fork 596
Description
Describe the bug
If an imagePullSecrets is missing the kubernetes keychain returns the error:
go-containerregistry/pkg/authn/kubernetes/keychain.go
Lines 67 to 70 in 02f47e1
| ps, err := client.CoreV1().Secrets(opt.Namespace).Get(ctx, name, metav1.GetOptions{}) | |
| if err != nil { | |
| return nil, err | |
| } |
However, in kubernetes these are logged and ignored (TIL!):

For necessary pull secrets, the behavior here is arguably desirable because you get a clear error message to surface to users.
However, if the goal is blind compatibility with Kubernetes semantics, then this manifests errors for unnecessary pull secrets where Kubernetes deploys things just fine!
To Reproduce
- Create a pod that deploys just fine, and add a non-existent pull secret.
- Enable
sigstore/policy-controlleron the namespace and try again - 💥
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
I believe that this would affect Knative (cc @dprotaso @evankanderson), Tekton (cc @imjasonh, @vdemeester), I know it affects sigstore/policy-controller (cc @vaikas @hectorj2f). cc @sudo-bmitch @jonjohnsonjr @dlorenc FYI
I could go either way on this, so I figured I'd tag some stakeholders and solicit opinions. 🍿