Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Moved the internal subscriptions delivery configuration to a config map #4832
Moved the internal subscriptions delivery configuration to a config map #4832
Changes from 3 commits
5f81887
d0faeb3
100a8e4
ff3a2b2
c08416b
e330be3
933c048
9d6583a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
nit: Don't we use
duckv1
everywhere else, likecorev1
above?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.
Any reason for making the name public but the key private? Can't they both be private?
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.
Is that annotation needed? As far as I can see we don't run deepcopy-gen on that package.
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.
I see that
NewInternalDeliveryConfigFromConfigMap
can returnnil
but I don't see a check to fallback to a default when this is the case. Maybe I overlooked, just want to be sure you've ensured this can not cause a panic.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.
Wherever possible it would be nice to avoid
.
imports. Even something short such ascmt
orcmtesting
helps with readability I think.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.
This import should be relocated, it is not a "Fake injection informer" so future readers will be confused.
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 candidate for
rectesting.NewConfigMap
I think.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.
I'm little confused why we need to add the ConfigMap here. As discussed in the spec PR, I thought the logic here would simply be (something like this):
del := t.Spec.Delivery
if del == nil {
del = b.Spec.Delivery
}
expected := resources.NewSubscription(t, brokerTrigger, brokerObjRef, uri, del)
if (t.Spec.Delivery != nil
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.
This subscription is an internal subscription between broker components, the actual dispatch to the service is done by the filter handler.
Now, with #4654 we're saying
BrokerSpec.Delivery
(same forTriggerSpec.Delivery
) configures the trigger delivery, hence the hop between the filter_handler and the actual service. On the other hand, this subscription is an internal hop between broker components.I've added a config map for that to allow the user to continue to modify this internal delivery spec, because in another PR i'll actually implement in mtbroker the delivery spec as stated by #4654
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.
Look at the description of this issue: #4515