-
Notifications
You must be signed in to change notification settings - Fork 117
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
Update Broker and Controller to use topic name templates #3162
Update Broker and Controller to use topic name templates #3162
Conversation
Skipping CI for Draft Pull Request. |
Codecov Report
@@ Coverage Diff @@
## main #3162 +/- ##
============================================
+ Coverage 63.51% 63.53% +0.01%
Complexity 757 757
============================================
Files 167 167
Lines 11660 11726 +66
Branches 239 239
============================================
+ Hits 7406 7450 +44
- Misses 3701 3716 +15
- Partials 553 560 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we make sure that if I change the template while I have existing brokers/channels, that change is not applied to existing objects?
Good catch! I hadn't considered that. Do you think that checking if there is a |
…isting topic name for broker
eb368c3
to
1a72d4c
Compare
@pierDipi there seem to be 2 main things left to work on before this PR is ready, and I am not sure what to do for either.
Any ideas/input would be appreciated :) |
Can't we set it on the channel and if it's not there we assume it will use the old pattern?
Can't we make public
|
/retest-required |
/retest-required |
/retest-required |
/retest-required |
@pierDipi I've addressed your earlier comments and fixed the broken tests. Let me know if there is anything else I should change on this PR! |
/retest-required |
3 similar comments
/retest-required |
/retest-required |
/retest-required |
…maps Signed-off-by: Calum Murray <cmurray@redhat.com>
/retest-required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Cali0707, pierDipi 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 |
/retest-required |
2 similar comments
/retest-required |
/retest-required |
…ensions#3162) * Updated broker to use broker topic name template * Updated broker reconciliation to onlyuse topic name template if no existing topic name for broker * Fixed import styling * Updated channel to use topic template * Updated channels to use topic annotations * Fixed import formatting * Added tests for reconciling with custom topic templates * Fixed go imports * use annotated topic names when deleting topics * switched from failing tests to using panics if topic names not setup properly * updated kafka feature yaml files to match channel topic template * updated kafka feature default vars to be private * updated tests * Fixed goimports * Fixed broker finalizer tests * Updated unit tests * Fixed unit tests * Switched templates to not be pointers * Updated broker and channel controllers to watch kafka feature config maps Signed-off-by: Calum Murray <cmurray@redhat.com> --------- Signed-off-by: Calum Murray <cmurray@redhat.com>
* Allow defining topic prefixes (knative-extensions#3157) * Added kafka feature for broker and channel topic templates * Added tests for broker and channel features * Updated codegen * Update Broker and Controller to use topic name templates (knative-extensions#3162) * Updated broker to use broker topic name template * Updated broker reconciliation to onlyuse topic name template if no existing topic name for broker * Fixed import styling * Updated channel to use topic template * Updated channels to use topic annotations * Fixed import formatting * Added tests for reconciling with custom topic templates * Fixed go imports * use annotated topic names when deleting topics * switched from failing tests to using panics if topic names not setup properly * updated kafka feature yaml files to match channel topic template * updated kafka feature default vars to be private * updated tests * Fixed goimports * Fixed broker finalizer tests * Updated unit tests * Fixed unit tests * Switched templates to not be pointers * Updated broker and channel controllers to watch kafka feature config maps Signed-off-by: Calum Murray <cmurray@redhat.com> --------- Signed-off-by: Calum Murray <cmurray@redhat.com> --------- Signed-off-by: Calum Murray <cmurray@redhat.com>
Fixes #3153
Proposed Changes
Status.Annotations
field on the Channel and Broker to make sure that if the template gets changed, the Channel/Broker topic name is not changed on existing Brokers/Channels.Release Note
Docs
knative/docs#5607