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

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joelanford
Copy link
Member

@joelanford joelanford commented Nov 27, 2024

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-ci openshift-ci bot 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
Copy link

netlify bot commented Nov 27, 2024

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit e2bfeef
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/6752118687f5ec0008c051b4
😎 Deploy Preview https://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.

Copy link

codecov bot commented Nov 27, 2024

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 8 commits behind head on main.

Files with missing lines Patch % Lines
internal/rukpak/convert/registryv1.go 79.67% 90 Missing and 46 partials ⚠️
cmd/registryv1-to-helm/main.go 0.00% 47 Missing ⚠️
internal/rukpak/convert/certmanager.go 89.28% 4 Missing and 5 partials ⚠️
cmd/manager/main.go 63.15% 5 Missing and 2 partials ⚠️
internal/rukpak/convert/certprovider.go 61.53% 5 Missing ⚠️
internal/applier/helm.go 40.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     
Flag Coverage Δ
e2e 48.48% <39.64%> (-3.68%) ⬇️
unit 59.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-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 29, 2024
@joelanford joelanford force-pushed the webhook-support branch 2 times, most recently from 426d2a2 to a966abd Compare December 3, 2024 03:01
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 3, 2024
@joelanford joelanford 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 webhooks Dec 3, 2024
@bentito
Copy link
Contributor

bentito commented Dec 3, 2024

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 joelanford force-pushed the webhook-support branch 4 times, most recently from bfac949 to f91d692 Compare December 4, 2024 19:41
@joelanford joelanford 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 webhooks Dec 4, 2024
@joelanford
Copy link
Member Author

@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 joelanford force-pushed the webhook-support branch 3 times, most recently from b5f77d1 to d0c6d90 Compare December 5, 2024 18:31
@joelanford joelanford changed the title WIP: ✨ Add cert-manager based support for registry+v1 bundles that include webhooks WIP: ✨ Add support for registry+v1 bundles that include webhooks Dec 5, 2024
@joelanford joelanford force-pushed the webhook-support branch 2 times, most recently from 07720cf to b9f4233 Compare December 5, 2024 19:59
@openshift-merge-robot openshift-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

PR needs rebase.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates 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