Skip to content
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

Merged
merged 1 commit into from Jul 7, 2020

Conversation

abhi-kn
Copy link
Contributor

@abhi-kn abhi-kn commented Jun 30, 2020

Fixes:
https://issues.redhat.com/browse/ODC-4171

Analysis / Root cause:
Presently knative/operator doesn't have discovery API to list available channels 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 on labelSelector 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:

  1. Install Serverless & Knative Apache Kafka operators
  2. Create Knative Serving & Knative Eventing

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@abhi-kn
Copy link
Contributor Author

abhi-kn commented Jun 30, 2020

/assign @invincibleJai

@abhi-kn
Copy link
Contributor Author

abhi-kn commented Jul 2, 2020

/assign @benjaminapetersen @christianvogt

@openshift-ci-robot
Copy link
Contributor

@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.
For more information please see the contributor guide

In response to this:

/assign @benjaminapetersen @christianvogt

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.

Copy link
Member

@invincibleJai invincibleJai left a 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}]}}]}

@abhi-kn
Copy link
Contributor Author

abhi-kn commented Jul 3, 2020

/assign @bparees

@christianvogt
Copy link
Contributor

@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.

@bparees
Copy link

bparees commented Jul 5, 2020

/unassign
/assign @spadgett

@abhi-kn
Copy link
Contributor Author

abhi-kn commented Jul 7, 2020

@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.

@christianvogt I think its not to good to do that way as the endpoint is accessible to all users

@spadgett
Copy link
Member

spadgett commented Jul 7, 2020

@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.

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.

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2020
@openshift-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 7, 2020
@openshift-merge-robot openshift-merge-robot merged commit 9bf0541 into openshift:master Jul 7, 2020
@spadgett spadgett added this to the v4.6 milestone Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/backend Related to backend lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants