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

Remove channel based broker #3212

Merged
merged 15 commits into from
May 29, 2020

Conversation

vaikas
Copy link
Contributor

@vaikas vaikas commented May 27, 2020

Addresses #3139

Proposed Changes

  • Remove ChannelBasedBroker implementation.

Release Note

- 🗑️ Remove feature or internal logic
Remove ChannelBasedBroker

Docs
knative/docs#2516

@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 27, 2020
@knative-prow-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@knative-prow-robot knative-prow-robot added the area/test-and-release Test infrastructure, tests or release label May 27, 2020
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label May 27, 2020
@knative-prow-robot knative-prow-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 27, 2020
@vaikas
Copy link
Contributor Author

vaikas commented May 27, 2020

/test all

@vaikas
Copy link
Contributor Author

vaikas commented May 27, 2020

/test pull-knative-eventing-integration-tests

@vaikas
Copy link
Contributor Author

vaikas commented May 27, 2020

/test all

@vaikas
Copy link
Contributor Author

vaikas commented May 27, 2020

/test all

@vaikas
Copy link
Contributor Author

vaikas commented May 27, 2020

/test all

@vaikas vaikas marked this pull request as ready for review May 27, 2020 21:07
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 27, 2020
@matzew
Copy link
Member

matzew commented May 28, 2020

/assign

@matzew
Copy link
Member

matzew commented May 28, 2020

@vaikas
Copy link
Contributor Author

vaikas commented May 28, 2020 via email

labels:
eventing.knative.dev/release: devel
spec:
replicas: 1
Copy link
Member

Choose a reason for hiding this comment

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

should we keep this with replicas: 0 ?

We have done this before with other "deprecated" PRs.

Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, if we do this, we can't remove this?
https://github.com/vaikas/eventing/blob/remove-channel-based-broker/hack/release.sh#L24

Just have the deployment there, set to 0 replicas?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so remove this file and move to mt-channel-broker? Or? :) Confused :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we want to delete the file outright and add a followup to do a cluster update for deleting a deployment in the knative-eventing namespace called broker-controller

@matzew
Copy link
Member

matzew commented May 28, 2020

I've tested this PR, using: https://github.com/matzew/knative-eventing-samples/tree/master/03-source_broker

worked fine!

A few nits?

the filter/ingress are called broker-xyz, e.g.:
https://github.com/vaikas/eventing/blob/remove-channel-based-broker/config/brokers/mt-channel-broker/deployments/broker-ingress.yaml#L18

while the controller is mt-broker-controller, see:
https://github.com/vaikas/eventing/blob/remove-channel-based-broker/config/brokers/mt-channel-broker/deployments/controller.yaml#L18

so, than the three deployments would all start with mt-xxx ?

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-eventing-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/mtbroker/filter/filter_handler.go 78.4% 78.3% -0.1
pkg/mtbroker/ingress/ingress_handler.go 83.3% 80.9% -2.5
pkg/reconciler/mtbroker/trigger.go 87.7% 87.6% -0.1

@vaikas
Copy link
Contributor Author

vaikas commented May 28, 2020

Thanks, I think I addressed all your comments, PTAL :)

@@ -20,6 +22,7 @@ metadata:
labels:
eventing.knative.dev/release: devel
spec:
replicas: 0
Copy link
Member

Choose a reason for hiding this comment

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

ahem... in the "MT broker" ?

I think we should keep the bits for the ST broker ? (at replica 0)

Or am I missing something here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, are you saying that we have this deployment in the config/brokers/mt-channel-broker/ where we set the ChannelBroker deployment to 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought that when we rename the deployment, we should bring the old MT deployments to replicas: 0. Then the one below creates a new deployment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, you end up with something like this:
note broker-filter, broker-ingress have been brought to 0 and mt-broker-filter and mt-broker-ingress are up and running.

broker-controller is similarly brought to 0.

vaikas-a01:eventing vaikas$ kubectl -n knative-eventing get deployments
NAME                   READY   UP-TO-DATE   AVAILABLE   AGE
broker-controller      0/0     0            0           43m
broker-filter          0/0     0            0           34d
broker-ingress         0/0     0            0           34d
eventing-controller    1/1     1            1           34d
eventing-webhook       1/1     1            1           34d
imc-controller         1/1     1            1           34d
imc-dispatcher         1/1     1            1           34d
kafka-ch-controller    1/1     1            1           16d
kafka-webhook          1/1     1            1           16d
mt-broker-controller   1/1     1            1           34d
mt-broker-filter       1/1     1            1           77m
mt-broker-ingress      1/1     1            1           76m

@vaikas
Copy link
Contributor Author

vaikas commented May 28, 2020

/test pull-knative-eventing-unit-tests

@vaikas
Copy link
Contributor Author

vaikas commented May 28, 2020

For the UT tests above, filed:
#3222

@n3wscott
Copy link
Contributor

I think this would be fine to do as a followup, but we should fold in the mt-broker-controller into the eventing controller and keep all the class filtering it does to avoid the deployment. It costs almost nothing to be idle...

@vaikas
Copy link
Contributor Author

vaikas commented May 28, 2020

I was under the impression that we mosdef wanted the broker to be a separately installable component which means it wouldn't be part of the core eventing controller. But maybe I misunderstand what you mean?

@vaikas
Copy link
Contributor Author

vaikas commented May 28, 2020

I created an issue to track the clean up of the old brokers. Seems like a bigger issue, and perhaps we should have a job that cleans up the old Brokers, service accounts, etc.? In any case, bigger than this PR imho?
#3225

Copy link
Member

@matzew matzew left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label May 29, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: matzew, vaikas

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

The pull request process is described here

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 merged commit 14b5201 into knative:master May 29, 2020
@vaikas vaikas deleted the remove-channel-based-broker branch May 29, 2020 15:12
@matzew matzew mentioned this pull request Jun 2, 2020
5 tasks
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. area/test-and-release Test infrastructure, tests or release cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants