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

feat: oci_pull supports loading Helm charts #349

Closed
wants to merge 3 commits into from

Conversation

sobotklp
Copy link

@sobotklp sobotklp commented Sep 5, 2023

This MR shows an example of loading a Helm chart using oci_pull from a repository (for example, ECR)

For example, in WORKSPACE:

oci_pull(
    name = "dependency-helm-chart",
    digest = "sha256:865647e7904a1e4b4e130b423d20b34dcc89a5a37b7bc82e30ff100c30cfb86f",
    registry = "111222333444.dkr.ecr.us-east-2.amazonaws.com",
    repository = "helm/dependency-charts",
)

This is related to issue #282

Copy link
Collaborator

@alexeagle alexeagle 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 the PR!!

Could you also try updating a documentation spot on oci_pull so it's easier for users to discover this ability?

oci/private/pull.bzl Show resolved Hide resolved
oci/private/pull.bzl Show resolved Hide resolved
oci/private/pull.bzl Show resolved Hide resolved
@alexeagle alexeagle mentioned this pull request Sep 26, 2023
@alexeagle
Copy link
Collaborator

Not going to merge this yet, as expanding the mime types is just the tip of an iceberg where we will get a larger scope and need to make a conscious choice about that.

@alexeagle alexeagle added the need: discussion Needs a proper discussion around the problem. label Sep 26, 2023
@sobotklp
Copy link
Author

@alexeagle no worries. I will spend some time adding more documentation and test cases as well.

I'm also having trouble coming up with a general use case for someone (besides me) who wants to use this functionality. Downloading the OCI helm chart is easy enough, but what to do with it afterwards? Any guidance you could give here would be appreciated.

@thesayyn
Copy link
Collaborator

That's the rest of the iceberg, aka OCI artifacts, which we are not yet ready to support. Neither rules_oci nor crane is able to do anything with artifacts yet.

On top of my head, I can think of using parts of a pulled helm chart to create a new one and push it with oci_push.

Currently, rules_oci only conforms to the non-artifact part of https://github.com/opencontainers/image-spec, but we are considering adding full support for artifacts in the future.

@anguslees
Copy link
Contributor

Downloading the OCI helm chart is easy enough, but what to do with it afterwards?

I want this, fwiw! I have my own bazel code that can do helm template $chart.tgz, but I would like to use rules_oci to actually fetch the chart file from an OCI repo.

@thesayyn
Copy link
Collaborator

I don't think we can accept this now, as the whole story for OCI artifacts is missing here. We need to work on #282 first before we can add this.

@thesayyn thesayyn closed this Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need: discussion Needs a proper discussion around the problem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants