-
Notifications
You must be signed in to change notification settings - Fork 218
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 infinite resource updates due to canonical format conversion of resource requirements #2565
Fix infinite resource updates due to canonical format conversion of resource requirements #2565
Conversation
eae7969
to
fc2de09
Compare
|
||
static void sanitizeResourceRequirements(final Map<String, Object> actualMap, | ||
final PodTemplateSpec actualTemplate, final PodTemplateSpec desiredTemplate) { | ||
if (actualTemplate == null || desiredTemplate == null) { |
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 not 100% sure if all of these null
checks are needed. I've added them for all fields that have no default value in their declaration.
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.
Overall this looks good to me, just made some really minor. comments.
In future maybe we could have sanitizers customizable, like have the ability to pass only few sanitizers if there will be more.
Thank you @Donnerbart !!
...orsdk/operator/processing/dependent/kubernetes/SSABasedGenericKubernetesResourceMatcher.java
Outdated
Show resolved
Hide resolved
...k/operator/processing/dependent/kubernetes/SSABasedGenericKubernetesResourceMatcherTest.java
Show resolved
Hide resolved
I guess this needs a rebase. Sorry I'm on out this and partially next week. @metacosm from my side this PR can go in after rebase, pls review it also. |
Signed-off-by: David Sondermann <[email protected]>
… SSABasedGenericKubernetesResourceMatcher Signed-off-by: David Sondermann <[email protected]>
… of resource requirements Signed-off-by: David Sondermann <[email protected]>
…tizerTest Signed-off-by: David Sondermann <[email protected]>
17e02d9
to
012f87b
Compare
Rebase is done. |
Sorry, I should have merged this before rebasing next. Apologies for the extra work that was bad scheduling on my part. 🙍 |
No worries, I'll rebase this as often as needed. I appreciate a lot how quickly you've looked into this contribution. I've also created a backport for the |
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.
Thank you!
…resource requirements (#2565) * refactor: clean up SSABasedGenericKubernetesResourceMatcher Signed-off-by: David Sondermann <[email protected]> * test: add missing tests for StatefulSet with VolumeClaimTemplates for SSABasedGenericKubernetesResourceMatcher Signed-off-by: David Sondermann <[email protected]> * fix: Fix infinite resource updates due to canonical format conversion of resource requirements Signed-off-by: David Sondermann <[email protected]> * test: Add test cases with init containers to ResourceRequirementsSanitizerTest Signed-off-by: David Sondermann <[email protected]> --------- Signed-off-by: David Sondermann <[email protected]> Signed-off-by: Chris Laprun <[email protected]>
…resource requirements (#2565) * refactor: clean up SSABasedGenericKubernetesResourceMatcher Signed-off-by: David Sondermann <[email protected]> * test: add missing tests for StatefulSet with VolumeClaimTemplates for SSABasedGenericKubernetesResourceMatcher Signed-off-by: David Sondermann <[email protected]> * fix: Fix infinite resource updates due to canonical format conversion of resource requirements Signed-off-by: David Sondermann <[email protected]> * test: Add test cases with init containers to ResourceRequirementsSanitizerTest Signed-off-by: David Sondermann <[email protected]> --------- Signed-off-by: David Sondermann <[email protected]> Signed-off-by: Chris Laprun <[email protected]>
…resource requirements (#2565) * refactor: clean up SSABasedGenericKubernetesResourceMatcher Signed-off-by: David Sondermann <[email protected]> * test: add missing tests for StatefulSet with VolumeClaimTemplates for SSABasedGenericKubernetesResourceMatcher Signed-off-by: David Sondermann <[email protected]> * fix: Fix infinite resource updates due to canonical format conversion of resource requirements Signed-off-by: David Sondermann <[email protected]> * test: Add test cases with init containers to ResourceRequirementsSanitizerTest Signed-off-by: David Sondermann <[email protected]> --------- Signed-off-by: David Sondermann <[email protected]> Signed-off-by: Chris Laprun <[email protected]>
…resource requirements (#2565) * refactor: clean up SSABasedGenericKubernetesResourceMatcher Signed-off-by: David Sondermann <[email protected]> * test: add missing tests for StatefulSet with VolumeClaimTemplates for SSABasedGenericKubernetesResourceMatcher Signed-off-by: David Sondermann <[email protected]> * fix: Fix infinite resource updates due to canonical format conversion of resource requirements Signed-off-by: David Sondermann <[email protected]> * test: Add test cases with init containers to ResourceRequirementsSanitizerTest Signed-off-by: David Sondermann <[email protected]> --------- Signed-off-by: David Sondermann <[email protected]> Signed-off-by: Chris Laprun <[email protected]>
…resource requirements (#2565) * refactor: clean up SSABasedGenericKubernetesResourceMatcher Signed-off-by: David Sondermann <[email protected]> * test: add missing tests for StatefulSet with VolumeClaimTemplates for SSABasedGenericKubernetesResourceMatcher Signed-off-by: David Sondermann <[email protected]> * fix: Fix infinite resource updates due to canonical format conversion of resource requirements Signed-off-by: David Sondermann <[email protected]> * test: Add test cases with init containers to ResourceRequirementsSanitizerTest Signed-off-by: David Sondermann <[email protected]> --------- Signed-off-by: David Sondermann <[email protected]> Signed-off-by: Chris Laprun <[email protected]>
…resource requirements (#2565) * refactor: clean up SSABasedGenericKubernetesResourceMatcher Signed-off-by: David Sondermann <[email protected]> * test: add missing tests for StatefulSet with VolumeClaimTemplates for SSABasedGenericKubernetesResourceMatcher Signed-off-by: David Sondermann <[email protected]> * fix: Fix infinite resource updates due to canonical format conversion of resource requirements Signed-off-by: David Sondermann <[email protected]> * test: Add test cases with init containers to ResourceRequirementsSanitizerTest Signed-off-by: David Sondermann <[email protected]> --------- Signed-off-by: David Sondermann <[email protected]> Signed-off-by: Chris Laprun <[email protected]>
Fixes #2509
Code coverage
Branch

next
Branch

bugfix/2509-ssa-matcher-quantity/next