Skip to content

Adding Source Spec.#1856

Merged
knative-prow-robot merged 19 commits into
knative:masterfrom
n3wscott:sources_spec
Oct 7, 2019
Merged

Adding Source Spec.#1856
knative-prow-robot merged 19 commits into
knative:masterfrom
n3wscott:sources_spec

Conversation

@n3wscott
Copy link
Copy Markdown
Contributor

Related to #1554

Proposed Changes

  • Add a first draft of a sources spec.

Release Note

Adding source-observer account and cluster roles to get and watch sources using aggregated RBAC roles.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Sep 10, 2019
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 10, 2019
@n3wscott
Copy link
Copy Markdown
Contributor Author

/cc @spencer-p

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 10, 2019
@knative-prow-robot
Copy link
Copy Markdown
Contributor

@n3wscott: GitHub didn't allow me to request PR reviews from the following users: spencer-p.

Note that only knative members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/cc @spencer-p

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Copy Markdown
Contributor

@Harwayne Harwayne left a comment

Choose a reason for hiding this comment

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

Wasn't there supposed to be something about the K_SINK env var?

Comment thread config/200-source-observer-clusterrole.yaml Outdated
Comment thread config/200-source-observer-clusterrole.yaml
aggregationRule:
clusterRoleSelectors:
- matchLabels:
duck.knative.dev/source: "true"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be duck.knative.dev/sourceObserver? In case we ever need a distinct ClusterRole in the future. Or just to differentiate from the label that is on sources themselves.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is how I have been thinking about it: the duck is a source; the role is source observer.

Comment thread config/200-source-observer-clusterrole.yaml
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md Outdated
@n3wscott
Copy link
Copy Markdown
Contributor Author

RE:

K_SINK

This is only for Knative Source pod-specable runtimes. This will be a followup.

n3wscott and others added 5 commits September 10, 2019 11:01
Co-Authored-By: Adam Harwayne <harwayne@google.com>
Co-Authored-By: Adam Harwayne <harwayne@google.com>
Co-Authored-By: Adam Harwayne <harwayne@google.com>
Co-Authored-By: Adam Harwayne <harwayne@google.com>
Co-Authored-By: Adam Harwayne <harwayne@google.com>
Comment thread config/200-source-observer-clusterrole.yaml Outdated
Copy link
Copy Markdown

@Justin2997 Justin2997 left a comment

Choose a reason for hiding this comment

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

Good work :) I will try to move the RabbitMQ event source to this structure.

Comment thread docs/spec/sources.md
duck.knative.dev/source: "true" # <-- required to be a source.
```

CRDs SHOULD be added to the `sources` category:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I suppose that the to yaml should make one file, this section is confusing to me.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I actutally do appreciate the breakdown of the different sections. This is a spec - not a tutorial.

Co-Authored-By: Adam Harwayne <harwayne@google.com>
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md
Comment thread docs/spec/sources.md Outdated

A Source:

- Represent an off or on-cluster system, service or application.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Represents ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not sure if the source itself does represent that system, service or app.

I usually tell people that with a source, you are able to connect to a 3rd party system, service or app - living on the cluster or somewhere outside.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

you are right, it should be Represents the request for events from...

Comment thread docs/spec/sources.md Outdated
In practice, sources are an abstract concept that allow us to create declarative
configurations through the usage of Custom Resource Definitions (CRDs) extending
Kubernetes. Those CRDs are instantiated by creating an instance of the resource.
It is up to the implementation of the source author to understand the best way
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Source Author: a persona ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes.

Comment thread docs/spec/sources.md
Comment thread docs/spec/sources.md Outdated
- example.com
resources:
- foos
- foos/status
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

- foos/finalizers

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

does an observer need to see the finalizers?

Copy link
Copy Markdown
Contributor

@vaikas vaikas left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! Some comments...

Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md
Comment thread docs/spec/sources.md
Comment thread docs/spec/sources.md
Comment thread docs/spec/sources.md
@matzew
Copy link
Copy Markdown
Member

matzew commented Sep 12, 2019 via email

@matzew
Copy link
Copy Markdown
Member

matzew commented Sep 24, 2019

perhaps this is relevant ?

#1956

I noticed that the eventing-contrib is even (gh) on a different notion :-)

Comment thread docs/spec/sources.md Outdated
@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Sep 24, 2019

/approve

@rhuss
Copy link
Copy Markdown
Contributor

rhuss commented Oct 1, 2019

While working on the Kn Eventing proposal, I remarked that this proposal supports a field .spec.eventTypes for all sources, which might be worth to consider to be included into this spec. This should be an array of event types for which an instance of this source CRD is configured to emit.

Does this make sense to add it as an (optional ?) field into this source specification ?

// @Harwayne @sixolet

@matzew
Copy link
Copy Markdown
Member

matzew commented Oct 1, 2019 via email

Copy link
Copy Markdown
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

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

A bunch of minor typographical suggestions; I don't think any make substantive design changes.

Comment thread docs/spec/README.md
- [Channel specification](channel.md) and
[older channel (0.6.0) spec](channel_060.md)

<!-- TODO(n3wscott): * [Error conditions and reporting](errors.md) -->
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You might just reference https://knative.dev/docs/serving/spec/knative-api-specification-1.0/#error-signalling for the general error pattern, rather than needing to write your own.

Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md
Comment thread docs/spec/sources.md Outdated
@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Oct 3, 2019

@n3wscott could we try to get this merged this week? It's blocking a few things and would be nice to unblock asap. Looks like most changes in the latest review are fairly cosmetic, so I'm hoping it will go quickly.

Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md Outdated
Comment thread docs/spec/sources.md Outdated
@evankanderson
Copy link
Copy Markdown
Member

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 7, 2019
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: evankanderson, n3wscott, vaikas-google

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [evankanderson,n3wscott,vaikas-google]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot merged commit 0366517 into knative:master Oct 7, 2019
matzew added a commit to matzew/eventing that referenced this pull request Sep 7, 2022
* Patch the upstream config file to repair or reenable old behavior

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Adding check for (legacy) annotations

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Running 'make RELEASE=v1.6 generate-release'

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.