-
Notifications
You must be signed in to change notification settings - Fork 263
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
feat(channel): Manage knative eventing channels #967
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: navidshaikh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@navidshaikh: 7 warnings.
In response to this:
Description
- Manage knative eventing channels
- Use the default configured channel type
Changes
- Add create, delete, describe and list for channels
Reference
Fixes #954
TODO:
- add configurable channel type
- add unit tests
- add e2e tests
/lint
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.
/hold for adding tests and channel type |
524274e
to
c31e76a
Compare
4919d45
to
c853c40
Compare
/hold cancel |
/retest
|
/retest
|
/retest getting |
b822560
to
4bbf451
Compare
- Support specifying the type of channel to create using --type. - Default is to use messaging layer configuration for channels - Channel type aliases via kn config and alias for InMemoryChannel - User can now configure channel type aliases in kn config and specify alias to GVK mappings for easy reference on CLI and refer with `--type` flag - User can also use inbuilt alias 'imc' for InMemoryChannel
4bbf451
to
7e08419
Compare
pkg/kn/flags/channel_types.go
Outdated
var ctypeMappings = map[string]schema.GroupVersionKind{ | ||
"imc": { | ||
Group: "messaging.knative.dev", | ||
Version: "v1beta1", | ||
Kind: "InMemoryChannel", | ||
}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll ship channel management with kn in 0.17. We're working with v1beta1 APIs/clientset of eventing in client, to be compatible with 0.17 and earlier releases.
We create channels and defer the type to cluster/namespace defaults unless specified explicitly on cli using --type
flag.
For convenience, we're giving this short hand alias for IMC channels, to override if user wants to, and pinning its GVK at v1beta1
.
Looking at knative/eventing#3793 and if the cluster default is going to be IMC at v1 for 0.17, should we rename this alias and add another at v1 ?
like imcv1
and imcv1beta1
, this way user get to choose whichever is available in the cluster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding explicit aliases: imcv1 and imcv1beta1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's about having a --type imc
alias for v1 and --type imc:v1beta1
for v1beta1 (and for completeness sake also a --type imc:v1
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reasoning behind this is, that I think we should separate the version here more visually and also make it optional so that we have a short default. I expect that v1beta1 is only temporary and will fade away over time ...
/test pull-knative-client-integration-tests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments. The main issue I have is lack of e2e tests. Not clear how to put it all together? Perhaps a basic workflow using channels? Or even a small bash tests to show how it all hangs together?
|
||
# Create a channel 'imc1' of type InMemoryChannel using inbuilt alias 'imc' | ||
kn channel create imc1 --type imc | ||
# same as above without using inbuilt alias but providing explicit GVK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any other way to explain this without using acronyms or simpler terms. thinking of users not familiar with the jargons.. :)
@navidshaikh can we tackle this still today to get this into the release for today ? that would be super cool. |
@maximilien : The PR already has e2e tests (see the PR description check-list), |
@rhuss : I've answered Max's question and resolved them. I think the only outstanding query I'd was whether to have version in IMC channel alias that we ship. For now its |
/retest seems like infra issue |
pkg/kn/flags/channel_types.go
Outdated
Version: "v1beta1", | ||
Kind: "InMemoryChannel", | ||
}, | ||
"imcv1": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see, colons are already used for gvk kind of specification. so i'm happy to use imcv1beta1 for the 'old' imc but please use 'imc' for the v1 as I expect this to be used much more often.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rhuss : fixed, PTAL.
The following is the coverage report on the affected files.
|
/retest
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks !
/lgtm
* feat(channel): Manage knative eventing channels - Support specifying the type of channel to create using --type. - Default is to use messaging layer configuration for channels - Channel type aliases via kn config and alias for InMemoryChannel - User can now configure channel type aliases in kn config and specify alias to GVK mappings for easy reference on CLI and refer with `--type` flag - User can also use inbuilt alias 'imc' for InMemoryChannel * Let channel reconcile, sleep for 5 secs after creation * Add imcv1 and imcv1beta1 aliases * Rename imcv1 alias to imc
…1575) (knative#967) * Fix for file not found error message discrepancy in windows * Added comment Co-authored-by: Gunjan Vyas <[email protected]>
Fix for file not found error message discrepancy in windows (knative#1575) (knative#967) Co-authored-by: Gunjan Vyas <[email protected]> change display versions (knative#1601) (knative#985) Co-authored-by: kobayashi <[email protected]>
Description
alias to GVK mappings for easy reference on CLI and refer with
--type
flagChanges
Reference
Fixes #954
TODO:
/lint