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
added service to fetch knative channel crds #5865
Conversation
/assign @invincibleJai |
/assign @benjaminapetersen @christianvogt |
@abhi-kn: GitHub didn't allow me to assign the following users: benjaminapetersen. Note that only openshift members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. 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. |
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.
It works as expected, have verified with cluster bot for both kubadmin
and self-provisioner with view only access.
Response
{"kind":"CustomResourceDefinitionList","apiVersion":"apiextensions.k8s.io/v1","metadata":{"selfLink":"/apis/apiextensions.k8s.io/v1/customresourcedefinitions","resourceVersion":"35800"},"items":[{"metadata":{"name":"channels.messaging.knative.dev","labels":{"duck.knative.dev/addressable":"true","eventing.knative.dev/release":"v0.13.3","knative.dev/crd-install":"true","messaging.knative.dev/subscribable":"true"}},"spec":{"group":"messaging.knative.dev","names":{"plural":"channels","singular":"channel","shortNames":["ch"],"kind":"Channel","listKind":"ChannelList","categories":["all","knative","messaging","channel"]},"versions":[{"name":"v1alpha1","served":true,"storage":true},{"name":"v1beta1","served":true,"storage":false}]}},{"metadata":{"name":"inmemorychannels.messaging.knative.dev","labels":{"duck.knative.dev/addressable":"true","eventing.knative.dev/release":"v0.13.3","knative.dev/crd-install":"true","messaging.knative.dev/subscribable":"true"}},"spec":{"group":"messaging.knative.dev","names":{"plural":"inmemorychannels","singular":"inmemorychannel","shortNames":["imc"],"kind":"InMemoryChannel","listKind":"InMemoryChannelList","categories":["all","knative","messaging","channel"]},"versions":[{"name":"v1alpha1","served":true,"storage":true},{"name":"v1beta1","served":true,"storage":false}]}}]}
/assign @bparees |
@spadgett what was the reason why we aren't simply exposing an endpoint for fetching CRD metadata and let the client specify the label selectors? This would avoid the need for a new end point each time we to perform these searches. |
/unassign |
@christianvogt I think its not to good to do that way as the endpoint is accessible to all users |
Then basic users could list metadata for all CRDs by hitting the endpoint directly. If possible, I think we should work with upstream to solve this in the operator. |
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhi-kn, invincibleJai, spadgett 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 |
Fixes:
https://issues.redhat.com/browse/ODC-4171
Analysis / Root cause:
Presently
knative/operator
doesn't have discovery API to list availablechannels
in cluster. And this API should be accessible to non-admin users as well.Solution Description:
Dependant API doesn't seem to be available in 4.6 timeline so a backend service in console is added as workaround. API
/api/console/knative-channels
has been added to list channel CRDs for any non-admin users based onlabelSelector
duck.knative.dev/addressable
&messaging.knative.dev/subscribable
.P.S: Have reused resource lister infrastructure created for listing knative event source crds.
Screen shots / Gifs for design review: n/a
Unit test coverage report: n/a
Test setup:
Browser conformance: