Eventing: Objects don't have a description via `kubectl explain`

Created on 27 Apr 2020  路  15Comments  路  Source: knative/eventing

Describe the bug
No description when running kubectl explain

$ kubectl explain brokers
KIND:     Broker
VERSION:  eventing.knative.dev/v1beta1

DESCRIPTION:
     <empty>
$ kubectl explain sinkbinding
KIND:     SinkBinding
VERSION:  sources.knative.dev/v1alpha2

DESCRIPTION:
     <empty>

Expected behavior
I expected a description like all other k8s objects.

Maybe it comes from the kubectl code and we cannot get explain to work on CRDs.

areapi kinbug kingood-first-issue prioritimportant-soon

Most helpful comment

with the current PRs in progress I think we should complete this issue? do you know if there are other resources that we should also be fixing similarly as part of this issue @lionelvillard ?

All 15 comments

related to #2609

Fixing #2609 (adding OpenAPI to CRDs) will fix this one.

I started looking at this and thought about just fixing the "top level" description for the crd, and then I ran into this. Just jotting this down, not saying this is the problem, but...
https://github.com/kubernetes/kubernetes/issues/82407

/assign

I'm going to take a stab at helping with this one

@aavarghese will be taking care of Sequence and Parallel (as reported to me by @lionelvillard).
I'm working on Trigger, Sinkbinding (both almost ready to merge) and Subscription (tests are failing, I'm debugging).

Still up for grabs are: channel, containerresource, and eventtype.

I'll probably pick one of these 3 to continue work on Monday, if anyone else wants to help please ping here noting which resource you'll work on.

Running the generator (https://github.com/Harwayne/knative-gcp/tree/reflective-schema/hack/schema) for Sequence and Parallel is throwing a panic.

panic: can't handle kind runtime.Object

goroutine 1 [running]:
github.com/google/knative-gcp/hack/schema/pkg/schema.generateSchema(0x2101e80, 0x1e33480, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    ...
exit status 2

I'm currently working on APIServerSource. cc: @lionelvillard @nlopezgi

I had

Running the generator (https://github.com/Harwayne/knative-gcp/tree/reflective-schema/hack/schema) for Sequence and Parallel is throwing a panic.

panic: can't handle kind runtime.Object

goroutine 1 [running]:
github.com/google/knative-gcp/hack/schema/pkg/schema.generateSchema(0x2101e80, 0x1e33480, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
  ...
exit status 2

I'm currently working on APIServerSource. cc: @lionelvillard @nlopezgi

iirc, I had the same error happen for channel. Lets get the easy ones out of the way and then deal later with whatever type this generator dislikes.
cc @Harwayne would you happen to know what this error means and which type it's related to?

@nlopezgi I'm working on containersource next

@aavarghese thanks for letting me know. I'm working on eventtype next.

I think we only have left the ones for which the generator is problematic:

  • Parallel, sequence, channel
    I'll follow up with Adam to see if he has ideas and try to find the culprit type that causes the problem. Will report once I have more info.

with the current PRs in progress I think we should complete this issue? do you know if there are other resources that we should also be fixing similarly as part of this issue @lionelvillard ?

@nlopezgi I'm curious, what was the issue with the generator that caused the failures for parallel, sequence, channel? How did we get past it?

@nlopezgi I'm curious, what was the issue with the generator that caused the failures for parallel, sequence, channel? How did we get past it?

It's an issue related to handling type Object that is transitively part of a ChannelTemplateSpec's Spec defined here:
https://github.com/knative/eventing/blob/master/vendor/k8s.io/apimachinery/pkg/runtime/types.go#L101
I "fixed" it by bypassing how the Interface type is handled in generate_schema here, returning a string instead of falling through and then manually completing the generated bits (with a preserve unknown fields statement).

/close
I think all the work here is done now. Please reopen if we're missing anything.

@nlopezgi: Closing this issue.

In response to this:

/close
I think all the work here is done now. Please reopen if we're missing anything.

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.

Was this page helpful?
0 / 5 - 0 ratings