Skip to content

fix: helm probe webhook retry logic#2873

Merged
ritazh merged 3 commits into
open-policy-agent:masterfrom
eshaanm25:master
Jul 19, 2023
Merged

fix: helm probe webhook retry logic#2873
ritazh merged 3 commits into
open-policy-agent:masterfrom
eshaanm25:master

Conversation

@eshaanm25
Copy link
Copy Markdown
Contributor

@eshaanm25 eshaanm25 commented Jul 12, 2023

What this PR does / why we need it:

  • Adds the --retry-connrefused flag to the curl command in the Gatekeeper post-install webhook
    • This flag allows the Job to continue probing the Gatekeeper Webhook API even if the connection is refused because the Gatekeeper Webhook API is not listening on the service port yet.
  • Sets the backoffLimit of the post-install webhook to 3
    • Currently, the webhook will retry probe requests until the time defined in the values file, but this will happen six times before a Helm Installation actually fails (because the default backoffLimit for Jobs is 6).

Which issue(s) this PR fixes:
Fixes #2872

Signed-off-by: Eshaan Mathur <37758843+eshaanm25@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@JaydipGabani JaydipGabani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for raising the PR!

Comment thread cmd/build/helmify/static/templates/probe-webhook-post-install.yaml Outdated
Signed-off-by: Eshaan Mathur <37758843+eshaanm25@users.noreply.github.com>
Copy link
Copy Markdown
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! LGTM

@sozercan sozercan requested a review from maxsmythe July 17, 2023 19:57
Copy link
Copy Markdown
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Patch coverage has no change and project coverage change: +0.07 🎉

Comparison is base (b869cab) 53.53% compared to head (8993804) 53.61%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2873      +/-   ##
==========================================
+ Coverage   53.53%   53.61%   +0.07%     
==========================================
  Files         133      133              
  Lines       11545    11545              
==========================================
+ Hits         6181     6190       +9     
+ Misses       4887     4880       -7     
+ Partials      477      475       -2     
Flag Coverage Δ
unittests 53.61% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ritazh ritazh merged commit 1076798 into open-policy-agent:master Jul 19, 2023
salaxander pushed a commit to salaxander/gatekeeper that referenced this pull request Jul 21, 2023
Signed-off-by: Eshaan Mathur <37758843+eshaanm25@users.noreply.github.com>
Co-authored-by: Rita Zhang <rita.z.zhang@gmail.com>
Signed-off-by: Xander Grzywinski <xandergrzyw@gmail.com>
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.

Helm Chart - Probe Webhook Retry Logic

6 participants