Skip to content

Add documentation for Brokers changing channel provisioners.#996

Merged
knative-prow-robot merged 4 commits into
knative:masterfrom
Harwayne:broker-provisioner
Apr 11, 2019
Merged

Add documentation for Brokers changing channel provisioners.#996
knative-prow-robot merged 4 commits into
knative:masterfrom
Harwayne:broker-provisioner

Conversation

@Harwayne
Copy link
Copy Markdown
Contributor

Proposed Changes

  • Add documentation for Brokers changing channel provisioners.

Release Note

NONE

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Mar 28, 2019
@knative-prow-robot knative-prow-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 28, 2019
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Harwayne

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:

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 28, 2019
@Harwayne Harwayne marked this pull request as ready for review March 28, 2019 18:09
@Harwayne
Copy link
Copy Markdown
Contributor Author

/assign @Abd4llA

@knative-prow-robot
Copy link
Copy Markdown
Contributor

@Harwayne: GitHub didn't allow me to assign the following users: Abd4llA.

Note that only knative members and repo collaborators can be assigned.
For more information please see the contributor guide

Details

In response to this:

/assign @Abd4llA

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.

@matzew
Copy link
Copy Markdown
Member

matzew commented Mar 28, 2019

/assign @matzew

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 few comments/questions.

Should this be moved to knative/docs at some point?

Comment thread docs/broker/README.md Outdated
Comment thread docs/broker/README.md Outdated
Comment thread docs/broker/README.md Outdated
Comment thread docs/broker/README.md

If `spec.channelTemplate` is specified:
1. Delete the `Broker`.
1. Create the `Broker` with the updated `spec.channelTemplate`.
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.

So the Broker won't reconcile the channel based on the channel template?

Should it?

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.

It won't.

As to whether it should, I'm not entirely sure. I didn't do it because I was worried about a single small change meaning that all in-flight events are irrevocably dropped. I left a TODO in the code to figure it out so that if we decide we want the change, we know where to do it.

Comment thread docs/broker/README.md
1. Delete the `Broker`.
1. Create the `Broker` with the updated `spec.channelTemplate`.

If `spec.channelTemplate` is not specified:
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.

Is this specifically for the default Broker, or is is this intended as a general solution?

Copy link
Copy Markdown
Contributor Author

@Harwayne Harwayne Apr 1, 2019

Choose a reason for hiding this comment

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

General solution. Incidentally, it is the only one that will work with the injected default Broker, because the injected default does not specify spec.channelTemplate.

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.

Isn't this a bit all very manual? and might be error prone ?

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.

It is manual. What errors would it be prone to?

When implementing Broker, I made the decision not to update Channels even if the Broker's spec.channelTemplate changed because it would drop all in flight events. We can revisit that decision and have it updated on the fly. The code change would be quite small and there is already a comment in the place it would occur (see #996 (comment)).

If someone really wants to cause an update on the fly, they can delete the Channels backing the Broker manually. The Broker controller will create new ones with the updated template. But I don't want to document this as I consider it an implementation detail that may change in the future.

Comment thread docs/broker/README.md

### ClusterChannelProvisioner

`Broker`'s use their `spec.channelTemplate` to create their internal `Channel`s, which dictate the durability guarantees of events sent to that `Broker`. If `spec.channelTemplate` is not specified, then the [default provisioner](https://www.knative.dev/docs/eventing/channels/default-channels/) for their namespace is used.
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.

👍

Comment thread docs/broker/README.md

#### Setup

Have a `ClusterChannelProvisioner` installed and set as the [default provisioner](https://www.knative.dev/docs/eventing/channels/default-channels/) for the namespace you are interested in. For development, the [`in-memory` `ClusterChannelProvisioner`](https://github.com/knative/eventing/tree/master/config/provisioners/in-memory-channel#deployment-steps) is normally used.
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.

markdown lint

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.

I don't know exactly which linter rules we use, so I just leave it to the sock puppet to fix within a day of submission.

@Harwayne
Copy link
Copy Markdown
Contributor Author

Ping. I think I've addressed all the comments. If this documentation is still desired, I'd like to get it in.

@matzew
Copy link
Copy Markdown
Member

matzew commented Apr 11, 2019

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 11, 2019
@knative-prow-robot knative-prow-robot merged commit 58382f4 into knative:master Apr 11, 2019
creydr pushed a commit to creydr/knative-eventing that referenced this pull request Jan 23, 2025
Co-authored-by: serverless-qe <serverless-support@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/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants