Skip to content

WIP: ✨ Add support for registry+v1 bundles that include webhooks - #1506

Closed
joelanford wants to merge 2 commits into
operator-framework:mainfrom
joelanford:webhook-support
Closed

WIP: ✨ Add support for registry+v1 bundles that include webhooks#1506
joelanford wants to merge 2 commits into
operator-framework:mainfrom
joelanford:webhook-support

Conversation

@joelanford

@joelanfordjoelanford commented Nov 27, 2024

Copy link
Copy Markdown
Member

Description

This PR adds support for bundles that define webhooks via:

  • A new alpha feature gate called RegistryV1WebhookSupport that is disabled by default
  • A new --registry-v1-cert-provider flag for the manager binary (only present when the feature gate is enabled) that allows someone installing OLMv1 to specify a certificate provider to use for registry+v1 webhooks.
  • A cert-manager certificate provider
  • An OpenShift Service CA certificate provider

The PR also has a small demo program (cmd/registryv1-to-helm) and some example input/output (using cloudnative-pg) that is a light wrapper around the internal/rukpak/convert library. I intend to remove all of this before the PR merges.

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

@openshift-ciopenshift-ciBot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 27, 2024
@netlify

netlifyBot commented Nov 27, 2024

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

NameLink
🔨 Latest commite2bfeef
🔍 Latest deploy loghttps://app.netlify.com/sites/olmv1/deploys/6752118687f5ec0008c051b4
😎 Deploy Previewhttps://deploy-preview-1506--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov

codecovBot commented Nov 27, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 76.79372% with 207 lines in your changes missing coverage. Please review.

Project coverage is 73.54%. Comparing base (e51c0c2) to head (e2bfeef).
Report is 63 commits behind head on main.

Files with missing linesPatch %Lines
internal/rukpak/convert/registryv1.go79.67%90 Missing and 46 partials ⚠️
cmd/registryv1-to-helm/main.go0.00%47 Missing ⚠️
internal/rukpak/convert/certmanager.go89.28%4 Missing and 5 partials ⚠️
cmd/manager/main.go63.15%5 Missing and 2 partials ⚠️
internal/rukpak/convert/certprovider.go61.53%5 Missing ⚠️
internal/applier/helm.go40.00%2 Missing and 1 partial ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #1506 +/- ##
==========================================
- Coverage 74.68% 73.54% -1.15% 
==========================================
Files 42 46 +4 Lines 3271 3931 +660 ==========================================
+ Hits 2443 2891 +448 - Misses 652 811 +159 - Partials 176 229 +53 
FlagCoverage Δ
e2e48.48% <39.64%> (-3.68%)⬇️
unit59.06% <72.86%> (+1.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.

@openshift-merge-robotopenshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 29, 2024
@joelanford
joelanfordforce-pushed the webhook-support branch 2 times, most recently from 426d2a2 to a966abdCompareDecember 3, 2024 03:01
@openshift-merge-robotopenshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 3, 2024
@joelanfordjoelanford changed the title ✨WIP: Add cert-manager based support for registry+v1 bundles that include webhooks✨ WIP: Add cert-manager based support for registry+v1 bundles that include webhooksDec 3, 2024
@bentito

Copy link
Copy Markdown
Contributor

So under cmd we're creating a registryv1-to-helm dir and then a cloudnative-pg dir? Isn't cloudnative-pg just a sample of an operator that requires a webhook? Shouldn't it just be in tests, or samples, or somewhere? Or even better if we didn't have all its code in our repo, but was just pulled in at test time?

@joelanford
joelanfordforce-pushed the webhook-support branch 4 times, most recently from bfac949 to f91d692CompareDecember 4, 2024 19:41
@joelanfordjoelanford changed the title ✨ WIP: Add cert-manager based support for registry+v1 bundles that include webhooksWIP: ✨ Add cert-manager based support for registry+v1 bundles that include webhooksDec 4, 2024
@joelanford

Copy link
Copy Markdown
MemberAuthor

@bentito I intend on completely removing the cloudnative-pg stuff before we merge. That is just there as an example of the transformation that the bundle to a chart, as performed by that command.

I would probably also remove that entire registryv1-to-helm command prior to merge.

@joelanford
joelanfordforce-pushed the webhook-support branch 3 times, most recently from b5f77d1 to d0c6d90CompareDecember 5, 2024 18:31
@joelanfordjoelanford changed the title WIP: ✨ Add cert-manager based support for registry+v1 bundles that include webhooksWIP: ✨ Add support for registry+v1 bundles that include webhooksDec 5, 2024
@joelanford
joelanfordforce-pushed the webhook-support branch 2 times, most recently from 07720cf to b9f4233CompareDecember 5, 2024 19:59
@openshift-merge-robotopenshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 15, 2024
@openshift-merge-robot

Copy link
Copy Markdown

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@joelanford

Copy link
Copy Markdown
MemberAuthor

I've mentioned this proof of concept PR in all of the relevant issues I could find. Closing since the proof of concept was successful and we can revisit implementation when we find time for those issues.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progressIndicates that a PR should not merge because it is a work in progress.needs-rebaseIndicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@joelanford@bentito@openshift-merge-robot