Skip to content
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

use a single client in webhooks #612

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

ahadas
Copy link
Member

@ahadas ahadas commented Sep 28, 2023

By using a single client that is injected to the webooks we not only decrease the execution time of webhooks that interact with the cluster (and thus need the client) but also resolve an issue that happens in some environments where it takes relatively long time to instantiate the client (few seconds) and then the execution of the webhook reaches a 13-seconds timeout. The deployment of Forklift gets stuck when this repeatedly happens when trying to add the "default host provider".

@ahadas ahadas changed the title use a single client in webhook use a single client in webhooks Sep 28, 2023
@ahadas ahadas requested review from liranr23, bennyz and bkhizgiy October 1, 2023 07:11
@ahadas ahadas force-pushed the single_client_webhooks branch from 8daad7d to eabdaf5 Compare October 1, 2023 11:02
@ahadas ahadas force-pushed the single_client_webhooks branch from eabdaf5 to 0103866 Compare October 1, 2023 13:54
By using a single client that is injected to the webooks we not only
decrease the execution time of webhooks that interact with the cluster
(and thus need the client) but also resolve an issue that happens in
some environments where it takes relatively long time to instantiate the
client (few seconds) and then the execution of the webhook reaches a
13-seconds timeout. The deployment of Forklift gets stuck when this
repeatedly happens when trying to add the "default host provider".

Signed-off-by: Arik Hadas <[email protected]>
@ahadas ahadas force-pushed the single_client_webhooks branch from 0103866 to df4f950 Compare October 1, 2023 13:55
@sonarcloud
Copy link

sonarcloud bot commented Oct 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ahadas ahadas merged commit a32837b into kubev2v:main Oct 2, 2023
8 checks passed
@ahadas ahadas deleted the single_client_webhooks branch October 2, 2023 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants