-
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
SinkBinding doesn't work with KServices that uses BYO revision names #9544
Comments
See also discussion at https://knative.slack.com/archives/C9JP909F0/p1600876741003800 |
This is probably a serving, rather than eventing, issue -- it would apply equally to a hypothetical I wonder if the best solution would be to clear |
Ultimately, different PodSpecables present different restrictions. For some cases they can handle it gracefully, and for others they should probably fail gracefully. I'd characterize BYO name as one of our niche restrictions. |
This issue is stale because it has been open for 90 days with no |
Until 0.20, BYO name was the default mode for As an alternative, I would suggest deprecated BYO revision name and let it fade out. I really don't see any convincing argument for BYO names, especially if it can not be ruled out, that only a single client is used for manipulating a KService. I'm reopening this issue, just to track this open question. |
I hit that one with kn 0.19 and serving 0.21. Maybe do reopen as you said @rhuss ? /reopen |
@cardil: Reopened this issue. 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. |
Is there anything left to be done here? The above sounds like this is working as designed and we'd at most document the behavior better and/or improve visibility of the issue? |
Well, I would say it depends: If BYO revisions is a fully supported feature by Knative Serving (even when it is a "niche feature") I would expect it to either work with SinkBindings or would have a documentation that BYO revision names are not supported for SinkBindings. An alternative would be to remove BYO revision names as I think this feature is not very well tested, too ? (see this bug :) |
This issue is stale because it has been open for 90 days with no |
/remove-lifecycle stale |
My understanding of SinkBinding is, that it also carries a reconciler which could really change the Knative Service at any point, kind of breaking the immutability requirement of revisions if we were to somehow bypass the name check that lead to the initial report here. IMO we have 2 options then:
|
/area api |
+1 for dropping BYO revision names as they have more problems than they solve (and the client these days default to server-generated revision names anyway and don't leverage client-side revision names). See also the release notes of https://github.com/knative/client/releases/tag/v0.21.0 for some more arguments against BYO revision names. |
I don't use BYO revision names much, but that's probably because I don't play with traffic splitting very often - beyond trivial demos. However, if we drop BYO support will that make it harder for people to setup and manage their traffic splitting? In particular, I often find it really annoying to work with systems that require me to create something, discover what I just created, and then use that info in a follow-on command. Not only because it should have let me pick a user-friendly name to begin with so I can reference it via scripts easily, but it also means that I have to (potentially) have my system in an undesirable state until I can execute that last step of that process. And if I have to jump through some hoops I normally would not have jumped through just to make things work, then that's not the best UX. So... what's the UX implications here if we drop BYO revision names for non-trivial traffic splitting? |
Actually, BYO as used by Said that there is good news as we exactly tackle this UX problem with the latest proposal for an updated UI for traffic split as described in this feature track This proposal will allow you to create traffic splits without looking up revisions names for the most common use cases. |
I fail to see any advantage for BYO revision names, even for traffic splits it is not practical (as explained above). |
I see users might like to use BYO revision name to equal their application version. In that way, they will know what they actually traffic split. It's easy for us, to use default revision numbered version (or even random one from before) as we just do examples and simple demos. Imagine yourself being in some company, and releasing and deploying new SSO service, that other services and users are constantly using. Your service version is changing from So, you have your images: Of course, to do that, you needed to always use BYO revision and name it after your build version. That's tedious. The traffic split FT @rhuss do not solve this, as it only is a CLI feature. In fact, it may make it harder (the I image that a company/team that takes traffic splitting seriously would invest in some wrapper that will perform deploys automatically. 5%, check logs for X min, 10%, check logs, 20%, check logs, ... Such thing could be written in anything, terraform code, an operator, or a web app. It's unrealistic to assume a human operator would use We could do a better job in generating revision names, it would save some confusion. We could:
|
It wouldn't help though. The problem in this case is that we're trying to update an immutable revision after it being created. If we adopt the naming strategy you suggest, the same issue would be around as the name of the revision with the same label (or image tag or whatever) would stay the same and thus collide in the same ways. I agree with the description on where BYO names are useful tho. |
One additional idea is that system components could have more permission than user does - meaning we might decide that SB can change a thing that is immutable for user. Or maybe introduce a mutant revision, and just shift the revision name to it - the underlying revision names could be sequential, and we just apply a proper revision name via label. |
IMO you can't use an image version/tag as a revision name reliably as every Configuration change would need a new revision name, even when you don't change the image (but maybe only a label or env var). A revision name != an application version. That has to be provided by the user. IMO it is far better to leverage the btw, with the CLI proposal mentioned above btw, you are still able to fully specify the traffic split without the help of a CLI to 'fill up to 100%' support. |
This issue is stale because it has been open for 90 days with no |
/remove-lifecycle stale While I think it might not be necessary to fix SinkBindings to run with BYO revision names, I also think we should document the restriction somewhere, ideally at the place where the SinkBinding itself is documented. |
This issue is stale because it has been open for 90 days with no |
@rhuss if this is still relevant can you open a docs bug to add a note about this please? |
/remove-lifecycle stale @abrennan89 Couldn't we just reuse this issue as doc one? |
@cardil: Reopened this issue. 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. |
@cardil if someone for serving is writing the docs then yeah that's fine, otherwise please close it and open an issue in the docs repo that provides specific details about what needs to change. |
This issue is stale because it has been open for 90 days with no |
This issue or pull request is stale because it has been open for 90 days with no activity. This bot triages issues and PRs according to the following rules:
You can:
/lifecycle stale |
/remove-lifecycle stale |
Describe the bug
When using a
SinkBinding
with a Knative Service as subject that uses BYO revision names (i.e. setting the revision name from the client), then noK_SINK
environment variable is injected to the KService.Expected behavior
K_SINK
should be injected to the Pod Template as a container env var regardless whether a Knative Service is configured for BYO revision names or not.To Reproduce
This will get no result as
kn
used BYO revision names by default. If switching over to server side generated names, then a K_SINK env var is injected.Knative release version
Eventing 0.17.3 (running on minikube)
The text was updated successfully, but these errors were encountered: