-
Notifications
You must be signed in to change notification settings - Fork 130
Use broker status annotations to stamp ConfigMap reference #1971
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
Use broker status annotations to stamp ConfigMap reference #1971
Conversation
Instead of adding a finalizer to the ConfigMap, we can record the ConfigMap data in the Broker status so that we can re-build the ConfigMap even when the ConfigMap is deleted first. Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
@@ -348,6 +348,7 @@ func (r *Reconciler) finalizeKind(ctx context.Context, broker *eventing.Broker) | |||
|
|||
logger.Debug("Topic deleted", zap.String("topic", topic)) | |||
|
|||
// TODO(pierDipi) remove after some releases (released in 1.4) |
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.
👍
Codecov Report
@@ Coverage Diff @@
## main #1971 +/- ##
============================================
+ Coverage 66.96% 67.04% +0.07%
- Complexity 631 633 +2
============================================
Files 140 140
Lines 6557 6560 +3
Branches 179 179
============================================
+ Hits 4391 4398 +7
+ Misses 1798 1794 -4
Partials 368 368
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
/kind bug |
The following is the coverage report on the affected files.
|
I do like the solution to capture this - and the in-memory rebuild |
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
/hold
in case one wants to do another review/test
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: matzew, 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 |
/test pull-knative-sandbox-eventing-kafka-broker-reconciler-tests |
/test pull-knative-sandbox-eventing-kafka-broker-unit-tests |
…xtensions#1971) * Use broker status annotations to stamp ConfigMap reference Instead of adding a finalizer to the ConfigMap, we can record the ConfigMap data in the Broker status so that we can re-build the ConfigMap even when the ConfigMap is deleted first. Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add test Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix lint error Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
/cherry-pick release-v1.2 |
@matzew: cannot checkout In response to this:
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. |
/cherry-pick release-1.2 |
@pierDipi: new pull request created: #1975 In response to this:
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. |
…xtensions#1971) (#142) * Use broker status annotations to stamp ConfigMap reference Instead of adding a finalizer to the ConfigMap, we can record the ConfigMap data in the Broker status so that we can re-build the ConfigMap even when the ConfigMap is deleted first. Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add test Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix lint error Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> Co-authored-by: Pierangelo Di Pilato <pierdipi@redhat.com>
We removed the "add finalizer to the ConfigMap logic" in knative-extensions#1971 and we kept the "remove the ConfigMap finalizer" in `FinalizeKind`. However, in order to remove the ConfigMap finalizer from every existing Broker that won't be deleted in the time span going from 1.3 to whatever release we remove the logic to remove the finalizer. Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
We removed the "add finalizer to the ConfigMap logic" in knative-extensions#1971 and we kept the "remove the ConfigMap finalizer" in `FinalizeKind`. However, in order to remove the ConfigMap finalizer from every existing Broker that won't be deleted in the time span going from 1.3 to whatever release we remove the logic to remove the finalizer. Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
We removed the "add finalizer to the ConfigMap logic" in knative-extensions#1971 and we kept the "remove the ConfigMap finalizer" in `FinalizeKind`. However, in order to remove the ConfigMap finalizer from every existing Broker that won't be deleted in the time span going from 1.3 to whatever release we remove the logic to remove the finalizer. Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> Co-authored-by: Pierangelo Di Pilato <pierdipi@redhat.com>
We removed the "add finalizer to the ConfigMap logic" in #1971 and we kept the "remove the ConfigMap finalizer" in `FinalizeKind`. However, in order to remove the ConfigMap finalizer from every existing Broker that won't be deleted in the time span going from 1.3 to whatever release we remove the logic to remove the finalizer. Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
We removed the "add finalizer to the ConfigMap logic" in knative-extensions#1971 and we kept the "remove the ConfigMap finalizer" in `FinalizeKind`. However, in order to remove the ConfigMap finalizer from every existing Broker that won't be deleted in the time span going from 1.3 to whatever release we remove the logic to remove the finalizer. Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
We removed the "add finalizer to the ConfigMap logic" in knative-extensions#1971 and we kept the "remove the ConfigMap finalizer" in `FinalizeKind`. However, in order to remove the ConfigMap finalizer from every existing Broker that won't be deleted in the time span going from 1.3 to whatever release we remove the logic to remove the finalizer. Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> Co-authored-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Instead of adding a finalizer to the ConfigMap, we can record
the ConfigMap data in the Broker status so that we can re-build
the ConfigMap even when the ConfigMap is deleted first.
Signed-off-by: Pierangelo Di Pilato pierdipi@redhat.com
Fixes #1970
Release Note