Skip to content

feat: Expose options to allow injection of external certificates#2249

Merged
ritazh merged 5 commits into
open-policy-agent:masterfrom
ethanrange:update_certificate_injection
Sep 2, 2022
Merged

feat: Expose options to allow injection of external certificates#2249
ritazh merged 5 commits into
open-policy-agent:masterfrom
ethanrange:update_certificate_injection

Conversation

@ethanrange
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

This PR is very similar to #1359 by @romachalm which was unfortunately never merged as the author stopped responding. I had followed the same path, implementing webhook annotations in #2231 before stumbling across this PR. I have recreated this with a slightly different interface.

This PR allows for external certificates to be injected and used in place of the default, self signed certificate. This is useful when using services such as cert-manager to automatically sign and rotate certificates. It provides Helm chart config values which when set:

  • Disable the default certificate rotation
  • Overwrite the certificate secret name used by the Controller Manager and Audit Deployments
  • Disables generation of the default server certificate

This, in combination with the annotations in #2231 allows for configuring external certificate injection

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #520

Special notes for your reviewer:
N/A

* Allow overriding the certificate secret name
* Only generate cert-secret if external injection is disabled
* Disable default certificate rotation when injecting

Signed-off-by: Ethan Range <65268454+ethanrange@users.noreply.github.com>
Signed-off-by: Ethan Range <65268454+ethanrange@users.noreply.github.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 26, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.57%. Comparing base (7bde011) to head (541d465).
Report is 836 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2249      +/-   ##
==========================================
+ Coverage   54.49%   54.57%   +0.07%     
==========================================
  Files         111      111              
  Lines        9556     9556              
==========================================
+ Hits         5208     5215       +7     
+ Misses       3947     3942       -5     
+ Partials      401      399       -2     
Flag Coverage Δ
unittests 54.57% <ø> (+0.07%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ethanrange ethanrange mentioned this pull request Aug 26, 2022
@ethanmwam
Copy link
Copy Markdown

Hi, I'm away for a while from next week onwards - if someone has a chance to review this before the weekend that'd be great - I can then make any changes requested before I leave. No worries if not, I can handle it upon my return.

@maxsmythe
Copy link
Copy Markdown
Contributor

I think @sozercan and @ritazh are out this week, so not sure if we can get review quorum :/

Copy link
Copy Markdown
Member

@ritazh ritazh left a comment

Choose a reason for hiding this comment

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

one nit, but otherwise lgtm

Comment thread cmd/build/helmify/static/README.md Outdated
ethanrange and others added 2 commits September 1, 2022 12:52
Co-authored-by: Rita Zhang <rita.z.zhang@gmail.com>
Signed-off-by: Ethan Range <65268454+ethanrange@users.noreply.github.com>
Signed-off-by: Ethan Range <65268454+ethanrange@users.noreply.github.com>
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

@ritazh ritazh merged commit 6f66057 into open-policy-agent:master Sep 2, 2022
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.

cert-manager support

5 participants