Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Channelable interface with a dedicated CRD #5

Closed
wants to merge 3 commits into from

Conversation

scothis
Copy link

@scothis scothis commented Oct 11, 2018

  • add ChannelSubscriptionSet CRD
  • remove Channelable interface
  • define that a ChannelSubscriptionSet is created for a Channel by the
    Provisioner and referenced in the ChannelStatus
  • update definition of Subscribeable

Fixes knative#512

This PR conflicts with #4, but is authored to allow either to merge merged independently. The second to merge will need to be rebased.

- add ChannelSubscriptionSet CRD
- remove Channelable interface
- define that a ChannelSubscriptionSet is created for a Channel by the
  Provisioner and referenced in the ChannelStatus
- update definition of Subscribeable

Fixes knative#512
Copy link

@grantr grantr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @scothis, it's helpful to see a concrete design.

_Channelable_ resource; the field MAY refer back to this _Subscribable_ as a
_status.subscriptions_ field (an _ObjectReference_). The resource
referenced in the _status.subscriptions_ field MUST be a
_ChannelSubscriptionSet_ resource; the field MAY refer back to this _Subscribable_ as a
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused about the self-referencing aspect. Is ChannelSubscriptionSet also Subscribable?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea the self referencing bit is confusing, that's a holdover that I should have removed.

I also proposed that the Subscribable interface be removed in #4, but I'll update this PR to make more sense individually.

### group: eventing.internal.knative.dev/v1alpha1

_A ChannelSubscriptionSet holds an aggregation of resolved subscriptions for a
Channel._
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple unknowns I'd like to see specified:

  • What is responsible for creating this object? Subscription controller, channel provisioner, something else?
  • When is it created? Channel creation time or subscription creation time?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I had a bit saying the ChannelSubscriptionSet should be created by the Provisioner as part of provisioning the channel, but I don't see it. Will add.


| Field | Type | Description | Limitations |
| ------------- | ----------------------- | --------------------------------------------------------------------- | -------------------------------------- |
| subscribers\* | ChannelSubscriberSpec[] | Information about subscriptions used to implement message forwarding. | Filled out by Subscription Controller. |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify what Subscription controller actually does:

  1. Subscription controller reconciles a Subscription.
  2. If the Subscription names a Channel in its from, Subscription controller gets that Channel then gets the ChannelSubscriptionSet in its Status.
  3. Subscription controller looks for a subscriber in ChannelSubscriptionSet matching the Subscription being reconciled, and adds one if none is found. (There's an issue here around losing a reference to the original subscription, so Subscription updates don't work and duplicate subscriptions aren't possible, but that's an issue with the current spec also.)

Is this correct?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I lifted this line from the current Channelable definition, the only change was to make the field required.

What you listed is the intended behavior. I thought I had also stated this explicitly. I'll add a clarification.

- renamed ChannelSubscriptionSet to ResolvedSubscriptionSet
- renamed ChannelSubscriptionSpec to ResolvedSubscription
- added details about the Subscription reconciliation process
@scothis
Copy link
Author

scothis commented Oct 11, 2018

@grantr PTAL

@n3wscott
Copy link
Owner

I think we will hold on this one.

@scothis
Copy link
Author

scothis commented Oct 18, 2018

Will create a new PR based on all of the other movement.

@scothis scothis closed this Oct 18, 2018
@scothis scothis deleted the replace-channelable branch October 18, 2018 20:49
n3wscott pushed a commit that referenced this pull request Mar 5, 2019
Refactoring to new folder structure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants