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

Adjust the Endpoints Informer events. #2779

Merged
merged 1 commit into from
Mar 19, 2020

Conversation

mattmoor
Copy link
Member

There was a superfluous Endpoints event registered, which is leftover from the single-tenant Broker.

There was a missing global resync due to changes in the shared Endpoints, which prevents Brokers from becoming ready if they are reconciled before the shared deployment have become ready.

Note: this logic is copied from similar logic in the Serving SKS controller, where we global resync on changes to the activator service.

There was a superfluous Endpoints event registered, which is leftover from the single-tenant Broker.

There was a missing global resync due to changes in the shared Endpoints, which prevents Brokers from becoming ready if they are reconciled before the shared deployment have become ready.
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Mar 19, 2020
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 19, 2020
@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/reconciler/mtbroker/controller.go 89.5% 83.3% -6.1

@mattmoor
Copy link
Member Author

/retest

1 similar comment
@mattmoor
Copy link
Member Author

/retest

@mattmoor
Copy link
Member Author

o
m
g
/retest

@n3wscott
Copy link
Contributor

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattmoor, n3wscott

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 19, 2020
@mattmoor
Copy link
Member Author

/retest

@@ -109,5 +106,29 @@ func NewController(
},
))

// When the endpoints in our multi-tenant filter/ingress change, do a global resync.
// During installation, we might reconcile Brokers before our shared filter/ingress is
// ready, so when these endpoints change perform a global resync.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need a global resync instead of just enqueuing brokers? The way I read this "installation..." part is that even after reaching a steady state, if endpoints change, the brokers wouldn't be enqueued? Assuming that all the Brokers are using MT based one, this is fine since they would all need to get enqueued anyways, but just curious why simply enqueing affected brokers is not enough?
Seems like we should enqueue all Brokers that have the MTChannelBasedBroker annotation only instead of all the Brokers?

Copy link
Member Author

Choose a reason for hiding this comment

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

All the global resync does is enqueue brokers. This is a filtered global resync, so it will only enqueue the MT brokers.

re: affected brokers

All of the MT brokers are affected by changes to the MT endpoint. 1->5 may not affect readiness, but 1->0 does (e.g. if the single pod crashes or is evicted) as would 0->1 (what I see)

@mattmoor
Copy link
Member Author

/retest

1 similar comment
@mattmoor
Copy link
Member Author

/retest

@knative-prow-robot knative-prow-robot merged commit 12f2beb into knative:master Mar 19, 2020
@mattmoor mattmoor deleted the mt-broker-ep-resync branch March 19, 2020 20:53
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants