knative / knative/eventing

Defaulting for Channel should resolve the namespace from context, not the resource

Open
#4,514 16 comments 2 reactions 2 assignees Claimed by @vishal-chdhry View on GitHub
area/channels kind/bug kind/good-first-issue priority/important-longterm triage/accepted
Dominant language
Go
Stars
1.6k
Forks
631
Avg merge
2d 1h
Merged PRs (30d)
6

Description

**Describe the bug**
When I use Kube REST api in the way `kn` uses 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/channels`

This problem makes eventing webhook pick the wrong default channel for namespace.

See following.

Make IMC cluster default and KafkaChannel `knativetutorial` namespace default:
```
$ cat <

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.