Skip to content

✨ Add support for deploying OCI helm charts in OLM v1 #1971

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OchiengEd
Copy link
Contributor

  • added support for deploying OCI helm charts which sits behind the HelmChartSupport feature gate
  • extended the Cache interface to allow storing of Helm charts

Description

This pull request aims to add logic to OLM v1 for handling OCI Helm chart support. We expect more work to go into this feature as further discussion on this occurs on issue #962 and the Arbitrary Configuration RFC which may inform how values.yml would be passed to Helm charts.

Reviewer Checklist

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

@OchiengEd OchiengEd requested a review from a team as a code owner May 15, 2025 17:23
Copy link

netlify bot commented May 15, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 5f58c8e
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/68362ed93501000008d9d4f5
😎 Deploy Preview https://deploy-preview-1971--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 project configuration.

@openshift-ci openshift-ci bot requested review from camilamacedo86 and trgeiger May 15, 2025 17:23
Copy link

openshift-ci bot commented May 15, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign thetechnick for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

codecov bot commented May 15, 2025

Codecov Report

Attention: Patch coverage is 27.58621% with 126 lines in your changes missing coverage. Please review.

Project coverage is 68.13%. Comparing base (71108b2) to head (5f58c8e).

Files with missing lines Patch % Lines
internal/shared/util/image/helm.go 29.62% 106 Missing and 8 partials ⚠️
internal/operator-controller/applier/helm.go 0.00% 6 Missing and 1 partial ⚠️
internal/shared/util/image/pull.go 0.00% 2 Missing and 1 partial ⚠️
internal/shared/util/image/mocks.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1971      +/-   ##
==========================================
- Coverage   69.11%   68.13%   -0.98%     
==========================================
  Files          79       80       +1     
  Lines        7023     7197     +174     
==========================================
+ Hits         4854     4904      +50     
- Misses       1887     2002     +115     
- Partials      282      291       +9     
Flag Coverage Δ
e2e 41.87% <1.72%> (-1.24%) ⬇️
unit 59.17% <27.58%> (-0.82%) ⬇️

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.

@OchiengEd OchiengEd force-pushed the helm_explorations branch from 3b36dfb to 272dcbf Compare May 15, 2025 17:40
Comment on lines 227 to 231
if hasChart(img) {
return pullChart(ctx, ownerID, imgSrc, canonicalRef, cache, layoutDir)
}

// Helm charts would error when getting OCI config
Copy link
Member

Choose a reason for hiding this comment

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

This tells me that our cache Store interface method is too specific. We need to make that generic enough to accommodate registry+v1 bundles and OCI helm charts as a first step, and rebase the feature-gated helm support on top.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Making the Cache interface generic enough to be able to store both Helm charts and OCI images is inevitable. Will be looking at that at some point

@OchiengEd OchiengEd force-pushed the helm_explorations branch from 272dcbf to 39948a0 Compare May 21, 2025 15:51
Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

OH. Great work 🥇

@@ -29,6 +29,7 @@ type LayerData struct {
}

type Cache interface {
ExtendCache
Copy link
Contributor

Choose a reason for hiding this comment

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

Is that valid for any or only Helm
Would be better we rename it like ChartCache, something like?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only for Helm charts at this time. We would need to see if it is possible to refactor the Store() method in the Cache interface to be able to store both Helm charts and OCI images to the cache.

@OchiengEd OchiengEd force-pushed the helm_explorations branch from 39948a0 to 5aa38f7 Compare May 27, 2025 21:23
* added support for deploying OCI helm charts which sits behind
the HelmChartSupport feature gate
* extended the Cache interface to allow storing of Helm charts
* inspect chart archive contents

Signed-off-by: Edmund Ochieng <ochienged@gmail.com>
@OchiengEd OchiengEd force-pushed the helm_explorations branch from 5aa38f7 to 5f58c8e Compare May 27, 2025 21:29
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.

5 participants