-
Notifications
You must be signed in to change notification settings - Fork 216
Changes to reduce webhook CPU usage. #3870
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
Conversation
public PartialObjectMetadata readCustomResourceDefinitionMetadata(String name) { | ||
HeaderModifierInterceptor.setPartialMetadataHeader(true); | ||
final PartialObjectMetadata partialObjectMetadata = toPartialObjectMetadata(get(name)); | ||
HeaderModifierInterceptor.removePartialMetadataHeader(); |
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.
Suggest putting the remove call in a finally block so that you can't miss removing the interceptor if the call fails.
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.
Changed in 2e419a7. Thanks.
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.
Just one comment... I think that you should wrap the remove interceptor call in a try/finally.
…on test to exclude the cssparser during instrumentation.
…on test to exclude the cssparser during instrumentation.
Kudos, SonarCloud Quality Gate passed! |
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
* Changes to reduce webhook CPU usage. Co-authored-by: Russell Gold <russell.gold@oracle.com>
* Changes to reduce webhook CPU usage. Co-authored-by: Russell Gold <russell.gold@oracle.com>
OWLS-105189 - Changes to reduce webhook CPU usage. This change -
createCRD
step.Integration test runs - https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/15980/
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/15979/
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/15967/