Skip to content

Make Subscribable type and its subtypes convert from/to v1/v1alpha1 #3474

@aliok

Description

@aliok

Problem
KafkaChannel for example is being bumped from v1alpha1 to v1beta1. But the Subscribable API it uses jumps from v1alpha1 to v1.
I needed to hardcode some stuff in my PR: knative/eventing-contrib#1371

We should better implement this conversion support.

Additional context (optional)
See slack chat: https://knative.slack.com/archives/C9JP909F0/p1593764728273200

Plan:

  • Make things implement apis.Convertible first. That'a a good structure. Handling conversion to all versions in 1 method. Otherwise, we'd end up creating multiple methods like "ConvertToV1", "ConvertToV1Beta1".
  • Then implement conversion of v1alpha1<>v1
  • Baby steps, multiple PRs for easy review. I did the whole conversion for all types in my local, the PR was super complicated as the types, signatures and the implementation was changed. Decided to create small PRs instead.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions