-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RevisionFailed when ServiceAccount references a non-existing imagePullSecret #10575
Comments
/area API
I'm sort of in-different to this statement. Although we differ with K8s, their behaviour may not be intentional/defined. You could argue Knative's fail-fast helps more than in hinders. |
Hmm, I tend to agree with @dprotaso here. Things might go breaking in unexpected ways using this I think, as some images will work and some won't 🤔. Not a strong opinion either though. |
Would it make sense to handle "missing /kind enhancement |
@evankanderson: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Going to close this out as I haven't seen a compelling enough reason to change the behaviour |
We encountered this problem recently in production. We had a service account with 2 pull secrets, one for the dev registry the other for the prod registry. Both exist in our dev clusters but only the prod one exists in production... you can guess what happened next. Our fault for not testing properly, but it would be nice to have the flexibility of defining secrets that might/might not exist. Other teams using the same clusters don't see an issue because as mentioned an ordinary pod does not behave this way. |
This surfaced again with a user using the following tooling: http://external-secrets.io/v0.5.6/ From slack: https://knative.slack.com/archives/C0186KU7STW/p1655389675950159
|
/lifecycle frozen I believe this will require changes to k8schain https://github.com/google/go-containerregistry/tree/main/pkg/authn/k8schain And we don't want to tight loop reconciliation if the secret isn't present - so we probably want an exponential fallback until the revision progress deadline passes |
I think there may be two different issues here:
|
Note that in my use case (#10575 (comment)) I don't use a service account, ExternalSercret pulls azure keyvault secrets and places them directly into a secret:
From what I can see, the secret just doesn't exist at all when the revision gets pulled and gets updated a while after that (I have a fair amount of secrets, can take several seconds). Not sure if that's important for the case. |
see google/go-containerregistry#1472 k8schain will ignore non-existing imagepullsecrets now. Upgrade |
@dprotaso Hi! I am new to knative and I would like to contribute to this issue, is this still open? |
We haven't bumped the dependency so this issue is up for grabs. |
/assign @Bisht13 |
Having a default ServiceAccount in a namespace referencing an imagePullSecrets that doesn't exist anymore in the namespace, creating a ksvc gets its Revision failed:
Deploying the same image as an ordinary pod works fine with the same ServiceAccount.
What version of Knative?
0.20.0
Expected Behavior
Creating a Ksvc should work even if some of the image pull secrets don't exist, if they are not actually needed to pull the image.
Actual Behavior
A Revision fails.
Steps to Reproduce the Problem
Modify the default SA in a namespace to include a non-existing imagePullSecret:
Create a Ksvc:
Notice the ksvc revision fails:
Such behaviour seems inconsistent with how k8s works, as the same image with the same ServiceAccount works fine as an ordinary Pod:
The text was updated successfully, but these errors were encountered: