-
Notifications
You must be signed in to change notification settings - Fork 81
[Consolidated KafkaChannel] Set KafkaChannel consolidated dispatcher OwenrRef #798
[Consolidated KafkaChannel] Set KafkaChannel consolidated dispatcher OwenrRef #798
Conversation
Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
) | ||
|
||
var trueConst = true |
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.
do we need this?
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.
yes, wherever we need a ref to a true, which in this PR in line 121
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 about https://pkg.go.dev/k8s.io/utils/pointer#Bool ?
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.
good one! didn't know about it.
Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
Codecov Report
@@ Coverage Diff @@
## main #798 +/- ##
==========================================
- Coverage 75.41% 74.63% -0.79%
==========================================
Files 144 139 -5
Lines 6497 6356 -141
==========================================
- Hits 4900 4744 -156
- Misses 1376 1393 +17
+ Partials 221 219 -2
Continue to review full report at Codecov.
|
Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
/retest |
@devguyio |
Works... see
and therefore the clean up works... |
Namespace: args.DispatcherNamespace, | ||
Name: dispatcherName, | ||
Namespace: args.DispatcherNamespace, | ||
OwnerReferences: []metav1.OwnerReference{args.OwnerRef}, |
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.
Should we add the KafkaChannel
itself to the Args
, and do smth like:
OwnerReferences: []metav1.OwnerReference{*kmeta.NewControllerRef(args.kc)},
we do that w/ the source, like here: https://github.com/knative-sandbox/eventing-kafka/blob/83e1b7a7c4353f129e83e39f137f4f662765d242/pkg/source/reconciler/source/resources/receive_adapter.go#L86
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.
that would mean you're setting the ownerRef of the dispatcher deployment to be owned by that KafkaChannel, which is not what we want to do here. This true in the source case because the receive adapter is per KafkaSource, but here the dispatcher is shared across all KafkaChannel object.
Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
/retest |
/test pull-knative-sandbox-eventing-kafka-upgrade-tests |
|
@devguyio would it make sense to move the refactoring to a separate pull request? |
That would make the fix a bit more portable to older versions. So the refactoring goes in after? |
@matzew I needed the refactoring to reason about that block which I need to touch and change with or without the refactoring. So I'm not very sure if without that refactoring it's gonna be more portable to older versions because that block needs to change anyway, and if it exists differently in older versions then even without the refactoring I'll have to manually fix the conflict in those versions. |
The following is the coverage report on the affected files.
|
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: devguyio, matzew 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 |
/cherry-pick release-0.23 |
/cherry-pick release-0.24 |
@matzew: #798 failed to apply on top of branch "release-0.23":
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. |
@matzew: new pull request created: #802 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. |
…OwenrRef (knative-extensions#798) * Set KafkaChannel consolidated dispatcher OwenrRef Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Remove the rest of superficial tests Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Use a k8s go-client to fetch controller deployment Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Refactor dispatcher reconciliation logic for easier reasoning Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Remove apps.kubernetes.io labels * fix bad comment * Use apimachinary wait package instead of manual backoff * fix typo
…OwenrRef (#798) (#803) * Set KafkaChannel consolidated dispatcher OwenrRef Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Remove the rest of superficial tests Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Use a k8s go-client to fetch controller deployment Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Refactor dispatcher reconciliation logic for easier reasoning Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Remove apps.kubernetes.io labels * fix bad comment * Use apimachinary wait package instead of manual backoff * fix typo
…OwenrRef (knative-extensions#798) (knative-extensions#803) * Set KafkaChannel consolidated dispatcher OwenrRef Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Remove the rest of superficial tests Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Use a k8s go-client to fetch controller deployment Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Refactor dispatcher reconciliation logic for easier reasoning Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Remove apps.kubernetes.io labels * fix bad comment * Use apimachinary wait package instead of manual backoff * fix typo
…er OwenrRef (knative-extensions#798) (#299) * [Consolidated KafkaChannel] Set KafkaChannel consolidated dispatcher OwenrRef (knative-extensions#798) (knative-extensions#803) * Set KafkaChannel consolidated dispatcher OwenrRef Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Remove the rest of superficial tests Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Use a k8s go-client to fetch controller deployment Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Refactor dispatcher reconciliation logic for easier reasoning Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com> * Remove apps.kubernetes.io labels * fix bad comment * Use apimachinary wait package instead of manual backoff * fix typo * running 'make RELEASE=v0.23.3 generate-release' to (re)generate the manifest used on CI run. In our case that ensures the dispatcher deployment is gone Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-authored-by: Matthias Wessendorf <mwessend@redhat.com>
/cherry-pick release-0.25 |
@matzew: new pull request created: #819 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. |
Proposed Changes
Release Note