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

Add Broker reconciler #31

Merged
merged 13 commits into from
Jul 10, 2020

Conversation

pierDipi
Copy link
Member

@pierDipi pierDipi commented Jul 8, 2020

Proposed Changes

  • Add Broker reconciler
  • Add a base reconciler for both Broker and Trigger reconcilers.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jul 8, 2020
@knative-prow-robot knative-prow-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 8, 2020
@pierDipi pierDipi force-pushed the control-plane branch 3 times, most recently from 0df75ca to 9bba2f5 Compare July 8, 2020 12:36
@pierDipi pierDipi changed the title Add Broker reconciler [WIP] Add Broker reconciler Jul 8, 2020
@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 Jul 8, 2020
@pierDipi pierDipi changed the title [WIP] Add Broker reconciler Add Broker reconciler Jul 8, 2020
@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 Jul 8, 2020
Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

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

Maybe I lost it in the process, but before triggering the update with UpdateDispatcherPodsAnnotation do you assert that the data plane config map actually changed?

apiVersion: v1
kind: ConfigMap
metadata:
name: kafka-broker-config
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we reuse config-kafka config map? (the same we use in eventing-contrib for kafka channel, we also have code to parse it https://github.com/knative/eventing-contrib/blob/master/kafka/channel/pkg/utils/util.go#L53). If it misses something, let's add stuff to it (the defaults on topic configs seems useful for kafka channel too)

control-plane/config/500-controller.yaml Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/base/reconciler.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/base/reconciler.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/base/reconciler.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/broker/broker.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/broker/broker.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/broker/broker.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/broker/broker.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/broker/broker.go Show resolved Hide resolved
@slinkydeveloper
Copy link
Contributor

Ok I pushed reviewed while i was still reviewing it, another round coming

Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

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

Second pass

control-plane/pkg/reconciler/broker/broker.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/broker/broker.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/broker/controller.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/broker/controller.go Outdated Show resolved Hide resolved
@pierDipi
Copy link
Member Author

pierDipi commented Jul 9, 2020

Maybe I lost it in the process, but before triggering the update with UpdateDispatcherPodsAnnotation do you assert that the data plane config map actually changed?

I'm not keeping track of the previous state (should I?), anyway on the data plane we are idempotent, so nothing breaks.

@pierDipi
Copy link
Member Author

pierDipi commented Jul 9, 2020

Ok, I left unresolved configurations related comments that we can reconcile with eventing-contrib later.

@slinkydeveloper
Copy link
Contributor

I'm not keeping track of the previous state (should I?), anyway on the data plane we are idempotent, so nothing breaks.

Sounds good

control-plane/pkg/reconciler/base/reconciler.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/base/reconciler.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/broker/broker.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/broker/broker_lifecycle.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/broker/broker_lifecycle.go Outdated Show resolved Hide resolved
control-plane/pkg/reconciler/broker/config.go Outdated Show resolved Hide resolved
control-plane/config/500-controller.yaml Outdated Show resolved Hide resolved
@slinkydeveloper
Copy link
Contributor

@pierDipi I feel you ahahah

@pierDipi
Copy link
Member Author

Now, it seems to be happy.

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
@pierDipi
Copy link
Member Author

rebased following: #35

@knative-metrics-robot
Copy link

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

File Old Coverage New Coverage Delta
control-plane/pkg/reconciler/broker/broker.go 60.0% 88.5% 28.5
control-plane/pkg/reconciler/broker/broker_lifecycle.go Do not exist 61.1%
control-plane/pkg/reconciler/broker/config.go Do not exist 100.0%
control-plane/pkg/reconciler/broker/controller.go 77.8% 84.6% 6.8
control-plane/pkg/reconciler/broker/topic.go Do not exist 100.0%

@slinkydeveloper
Copy link
Contributor

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pierDipi, slinkydeveloper

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 Jul 10, 2020
@knative-prow-robot knative-prow-robot merged commit 57a7788 into knative-extensions:master Jul 10, 2020
@pierDipi pierDipi deleted the control-plane branch April 14, 2021 21:15
matzew added a commit to matzew/eventing-kafka-broker that referenced this pull request Nov 12, 2021
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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants