Bug 2083641 - OpenShift Console Knative Eventing ContainerSource generates wrong api version when pointed to k8s Service
Summary: OpenShift Console Knative Eventing ContainerSource generates wrong api versio...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.10
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.11.0
Assignee: Jaivardhan Kumar
QA Contact: spathak@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 2084430
TreeView+ depends on / blocked
 
Reported: 2022-05-10 13:58 UTC by bshaw
Modified: 2022-08-10 11:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 11:11:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 11475 0 None open Bug 2083641: fixes apiversion for k8s svc and resource selection for sink for form yaml switcher 2022-05-11 06:42:15 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:11:19 UTC

Description bshaw 2022-05-10 13:58:59 UTC
Description of problem:

In OpenShift 4.10, Kubernetes Services are [valid sink resources during Event Source creation](https://developers.redhat.com/articles/2022/03/22/whats-new-developers-openshift-410-console#openshift_4_10_serverless_and_eventing_features) - however, the generated `ContainerSource` resource sets `.spec.apiVersion` to `core/v1` instead of `v1`.

This results in the `SinkBinding` failing to generate the URI to the sink.



How reproducible:
Yes

Steps to Reproduce:
1. Install OpenShift Serverless on OpenShift 4.10.11 (RHPDS OpenShift 4.10 Workshop) and setup Knative Serving and Knative Eventing

2. Create a `Deployment` and `Service` that listens for CloudEvents - 

3. In the OpenShift console,
  a. Select Add / Eventing / EventSource / ContainerSource / Create Event Source
  b. Set the Image field to something that sends CloudEvents - I used `ghcr.io/kwkoo/fast-ping`
  c. Set the Input Target field to Resource and point it to the `event-display-deploy` Service
  d. Click Create

4. When you look at the generated `SinkBinding`, you get:

```
...
spec:
  sink:
    ref:
      apiVersion: core/v1
      kind: Service
      name: event-display-deploy
      namespace: demo
  subject:
    apiVersion: apps/v1
    kind: Deployment
    name: fast-ping-deployment
    namespace: demo
status:
  conditions:
    - lastTransitionTime: '2022-05-06T05:24:28Z'
      message: 'URI could not be extracted from destination '
      reason: NoURI
      status: 'False'
      type: Ready
```

5. It only works if you change `.spec.sink.ref.apiVersion` in the `ContainerSource` to `v1`

Comment 1 Christoph Jerolimov 2022-05-10 19:18:46 UTC
(Trigger Jira sync)

Comment 5 spathak@redhat.com 2022-05-24 15:13:30 UTC
Verified on build version: 4.11.0-0.nightly-2022-05-20-213928
browser version: Chrome 99

Comment 7 errata-xmlrpc 2022-08-10 11:11:01 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security update), 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/RHSA-2022:5069


Note You need to log in before you can comment on or make changes to this bug.