-
Notifications
You must be signed in to change notification settings - Fork 628
Defaulting for Channel should resolve the namespace from context, not the resource #4514
Copy link
Copy link
Open
Labels
area/channelskind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.kind/good-first-issueDenotes an issue ready for a new contributor.Denotes an issue ready for a new contributor.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.Important over the long term, but may not be staffed and/or may need multiple releases to complete.triage/acceptedIssues which should be fixed (post-triage)Issues which should be fixed (post-triage)
Milestone
Metadata
Metadata
Assignees
Labels
area/channelskind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.kind/good-first-issueDenotes an issue ready for a new contributor.Denotes an issue ready for a new contributor.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.Important over the long term, but may not be staffed and/or may need multiple releases to complete.triage/acceptedIssues which should be fixed (post-triage)Issues which should be fixed (post-triage)
Type
Projects
Status
Backlog
Describe the bug
When I use Kube REST api in the way
knuses it, I can see behavior differences when I post these 2:{"kind":"Channel","apiVersion":"messaging.knative.dev/v1beta1","metadata":{"name":"my-channel"}}{"kind":"Channel","apiVersion":"messaging.knative.dev/v1beta1","metadata":{"name":"my-channel", "namespace":"knativetutorial"}}URL posted is same:
apis/messaging.knative.dev/v1beta1/namespaces/knativetutorial/channelsThis problem makes eventing webhook pick the wrong default channel for namespace.
See following.
Make IMC cluster default and KafkaChannel
knativetutorialnamespace default:Start proxy:
Post 2 channel requests to the same namespace URL; 1 with namespace in
metadata, other not:First channel is created with KafkaChannel, the 2nd created with IMC.
Expected behavior
Defaulting to use the context namespace.
To Reproduce
Steps are above.
Knative release version
0.17, 0.18, 0.19
Additional context
Add any other context about the problem here such as proposed priority