Bug 1838754

Summary: Update endpoint to include labels in knative event source crd response
Product: OpenShift Container Platform Reporter: Abhishek K N <akyathan>
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: high Docs Contact:
Priority: high    
Version: 4.5CC: aos-bugs, gamore, jokerman, nmukherj, xiaocwan
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:41:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Abhishek K N 2020-05-21 17:40:55 UTC
Description of problem:
Currently we have Service `api/console/knative-event-sources` to fetch EventSources on cluster based on DuckType and it fetches as all sources. With Serverless 1.7.x contains deprecated sources, but there is no indication which is deprecated or not. So they introduced a label for it

eventing.knative.dev/deprecated: "true"

We need Service to extend the capability to include `labels` in CRD response

Version-Release number of selected component (if applicable): 4.5


Prerequisites:
  Install 'OpenShift Serverless Operator' & create CR for 'Knative Eventing'

Steps to Reproduce:
1. Fire following API using curl/REST client/browser https://<openshift host name>/api/console/knative-event-sources 
2. Check the response of Api `api/console/knative-event-sources`
3. Try logging with Admin as well as basic user credentials

Actual results:
Event sources CRD response doesn't include `labels` attribute as part of metadata object

Expected results:
Event sources CRD response should include `labels` attribute as part of metadata object


Additional info:

Comment 4 XiaochuanWang 2020-05-27 07:40:58 UTC
{"metadata":{"name":"apiserversources.sources.knative.dev","labels":{"duck.knative.dev/source":"true","eventing.knative.dev/release":"v0.13.3","eventing.knative.dev/source":"true","knative.dev/crd-install":"true"}},...

Now it can be verified, checked on 4.5.0-0.nightly-2020-05-26-224432

Comment 5 Gajanan More 2020-05-27 09:29:16 UTC
I have validated the bugzilla on:
Build:4.5.0-0.nightly-2020-05-27-000432
Browser: Google Chrome Version 81.0.4044.129
Marking this as verified.

Comment 7 errata-xmlrpc 2020-07-13 17:41:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2409