-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix support for Knative services #4249
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
Fix support for Knative services #4249
Conversation
Codecov Report
|
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.
Thanks for your PR @mark-burnett! So this patch turns an O(1) lookup into an O(n) linear search. I think this whitelist can be expressed as a map[apimachinery.GroupKind]bool
?
Hey @briandealwis, thanks for taking a look. I think this lookup is effectively also O(k), since the cost is bounded by the length of the whitelist rather than O(n) on the input. That said, after benchmarking both, the map is faster even when only looking for the first element in the list. My only guess is that this is related to string comparison being possibly slower than hashing the object. I'll follow up with an update.
|
745d5f9
to
b5e68ee
Compare
Co-authored-by: Brian de Alwis <[email protected]>
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.
Thanks!
This re-instates support for image substitution with Knative services, which appears to have been broken when the fix for not substituting images in CRDs was implemented in #3833