-
Notifications
You must be signed in to change notification settings - Fork 600
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
Create new Subscription in pkg/apis/eventing as per the new spec. #421
Changes from 1 commit
313b88b
758ae8c
dc67d24
a20d789
7e2d059
28be0a6
0c3fcd7
785ddbc
973d77c
b8a8e49
38983f0
c9fc3b7
add1e88
6a6778a
9237900
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,17 +63,48 @@ type SubscriptionSpec struct { | |
// +optional | ||
Generation int64 `json:"generation,omitempty"` | ||
|
||
// From is the name of the channel to subscribe to for receiving events | ||
// to be transformed. | ||
From string `json:"from"` | ||
// Reference to an object that will be used to create the subscription | ||
// for receiving events. The object must have spec.subscriptions | ||
// list which will then be modified accordingly. | ||
// | ||
// You can specify only the following fields of the ObjectReference: | ||
// - Kind | ||
// - APIVersion | ||
// - Name | ||
From *corev1.ObjectReference `json:"from,omitempty"` | ||
|
||
// Processor is the processor service DNS name. Events | ||
// from the From channel will be delivered here and replies are sent | ||
// to To channel. | ||
Processor string `json:"processor,omitempty"` | ||
|
||
// To is the name of the channel to send transformed events | ||
To string `json:"to,omitempty"` | ||
// Reference to an object that will be used to deliver events for | ||
// (optional) processing before sending them to To for further | ||
// if specified for additional Subscriptions to then subscribe | ||
// to these events for further processing. | ||
// | ||
// For example, this could be a reference to a Route resource | ||
// or a Configuration resource. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/Configuration/Service/ Configuration is not targetable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
// TODO: Specify the required fields the target object must | ||
// have in the status. | ||
// You can specify only the following fields of the ObjectReference: | ||
// - Kind | ||
// - APIVersion | ||
// - Name | ||
// +optional | ||
Processor *corev1.ObjectReference `json:"processor,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the idea that you would need to create a k8s Service to be able to call something which is not on the k8s cluster (e.g. a VM)? Previously we had the idea that a targetable was either a DNS name or an ObjectReference. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, so, this is a bit interesting in a sense, that I'd expect that if you're hitting something that's outside the cluster, just a DNS entry is probably not going to cut it. I'd expect things like credentials to be involved on that, so as not to just be wide open to everything. I could hoist this into a higher level object to give us some future proofing for now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another option is to allow the reference for a targetable to also include a k8s Service. It doesn't implement the targetable interface, but we know how to shoehorn it into what we need. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @scothis when we talked about this wrt Targetable, thinking was that a service was not enough, that it would actually have to be a URI. So, I'm hoisting that up. |
||
|
||
// To is the (optional) resolved channel where (optionally) processed | ||
// events get sent. | ||
// | ||
// This has to be a channel | ||
// | ||
// TODO: Specify the required fields the target object must | ||
// have in the status. | ||
// You can specify only the following fields of the ObjectReference: | ||
// - Kind | ||
// - APIVersion | ||
// - Name | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about UID? I'm assuming that Namespace is specifically excluded? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Is there a good way to lookup a resource by UID?
Keeping subscriptions within a single namespace is a good idea until we understand fully understand the tenancy consequences of allowing them to cross namespaces. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's start with names (no UIDs), and a single namespace until we have more understanding on what cases this does not handel? |
||
// +optional | ||
To *corev1.ObjectReference `json:"to,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't comment on other parts of this CRD, so leaving the comment here:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, we haven't come across a use case for argument/params with the current buses. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed. |
||
|
||
// Arguments is a list of configuration arguments for the Subscription. The | ||
// Arguments for a channel must contain values for each of the Parameters | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer a DNS name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done