Adding Source type.#457
Conversation
|
/assign @grantr /cc @vaikas-google |
| // - APIVersion | ||
| // - Name | ||
| // Currently Kind must be "Channel" and | ||
| // APIVersion must be "channels.knative.dev/v1alpha1" |
There was a problem hiding this comment.
eventing.knative.dev/v1alpha1
|
|
||
| // Valid from only contains the following fields: | ||
| // - Kind == 'Channel' | ||
| // - APIVersion == 'channels.knative.dev/v1alpha1' |
There was a problem hiding this comment.
eventing.knative.dev/v1alpha1
grantr
left a comment
There was a problem hiding this comment.
Looks reasonable, but I'm surprised by the Channel spec field. It may be that I missed the discussion in which this field was decided on.
/cc @evankanderson
| // ObservedGeneration is the 'Generation' of the Source that | ||
| // was last reconciled by the controller. | ||
| // +optional | ||
| ObservedGeneration int64 `json:"observedGeneration,omitempty"` |
There was a problem hiding this comment.
Not really part of this PR, but I just noticed Subscription doesn't have an ObservedGeneration field. Should it?
| // Name, Kind, APIVersion | ||
| // If any other fields are set and is not the Zero value, returns an apis.FieldError | ||
| // with the fieldpaths for all those fields. | ||
| func checkDisallowedObjectReferenceFields(f corev1.ObjectReference) *apis.FieldError { |
There was a problem hiding this comment.
How does this look with hardcoded fields instead of reflection? I think that might be easier to read, and the fields of ObjectReference are unlikely to change.
There was a problem hiding this comment.
I copied this from Ville, perhaps we can do a followup to clear this up if we need to
There was a problem hiding this comment.
subscribable_validation.go is a copy and rename of original subscription methods that are useful for sources
grantr
left a comment
There was a problem hiding this comment.
/approve
/lgtm
Thanks @n3wscott for this PR and helping resolve the confusion around interface contracts. 😁 I think there's further discussion to be had with the group about the specifics of those contracts but I'm happy to move this PR forward.
These suggested changes can go in a followup PR:
- stop using reflection to validate ObjectReferences.
- Move Subscribable and Channelable contract validations to Subscription controller reconcile since they'll require the object content to verify.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: grantr, n3wscott The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold |
|
/lgtm |
|
The following is the coverage report on pkg/.
|
| // +optional | ||
| ObservedGeneration int64 `json:"observedGeneration,omitempty"` | ||
|
|
||
| // Source might be Subscribable. This points to the Channelable object. |
There was a problem hiding this comment.
might? I think it must be Subscribable, how else would we get events from it? Is this CRD the "factory" for say, creating K8S events for consumption by the system, or is an instance one that I could create a Subscription.Spec.From to point to?
Updates to ci run
[release-v1.12 ] Trusted CA bundle CM work
Fixes #445
Proposed Changes
Release Note