Skip to content

Revisit the decision for CRD for Channels instead of single CRD with opaque data inside of it. #1002

@vaikas

Description

@vaikas

Problem

Background:
https://docs.google.com/document/d/1IiPq5FP74mT4bm8V__dzCI7Dh2n9GCzgib_S3lboJWg/edit#heading=h.leipbgd2g5d5

'
Currently the Channels are implemented using a "provisioner" pattern. This at the highlevel means roughly the following:

  1. There's one Channel CRD which contains a single field runtime.rawextension which contains all the configurable options
  2. Specific Channel Controllers watch all the Channels and react when they see Spec.Provisioner being themselves

Sources are implemented using a CRD which:

  1. There's one CRD per Channel implementation which contains all the configurable options in the Spec field
  2. Each Source Controller watches the CRD type which it is responsible for.

This proposal is to change the Channel implementations to be just like Sources, or more generally what's typically referred to as Operators.

I believe using a single CRD for single Channel is much better design pattern and allows us to benefit from all the goodies of the CRDs for free:

  1. better installation model (single CRD + Controller)
  2. better validation / default pattern (webhook can inspect the incoming request and not let it into the etcd). Today this is not doable (well, there might be a way, but not a standard way)
  3. better way to document / describe the configurable options (standard CRD (OpenApi schema))
  4. Others too I'm sure

The one downside I can recall from previous discussions where around RBAC problems but I believe serving has solved these with the Aggregated ClusterRoles + DuckTypes. There might be others, not trying to ignore Cons, just don't recall them all (there's others in the original document)

Anyways, wanted to get some thoughts from the community, now that we have more experience writing channels, operating Knative and so forth, etc.

Persona:
Channel Implementor (Integrator?)
Operator

Exit Criteria
Revisit the decision whether Channels should be implemented as a CRD or as a provisioner

Time Estimate (optional):
unclear

Additional context (optional)
Add any other context about the feature request here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions