Skip to content

Support Helm semver encoding in OCI repositories #1834

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

evankanderson
Copy link

(See also the related fluxcd/flux2#4674, which gave me the hint I needed.)

I'm attempting to use a Helm chart with versions like 0.20250616.4188+ref.2dec694 (which gets encoded as the tag :0.20250616.4188_ref.2dec694) with the instructions here: https://fluxcd.io/flux/cheatsheets/oci-artifacts/#helm-oci

Unfortunately, because 0.20250616.4188_ref.2dec694 is not a valid semver, I get the error message:

failed to determine the artifact tag for 'oci://ghcr.io/mindersec/minder/helm/minder': no match found for semver: >0.0.1

Based on the documentation at https://helm.sh/docs/topics/registries/#oci-feature-deprecation-and-behavior-changes-with-v380 and the discussion at opencontainers/distribution-spec#154, it seems plausible to assume that replacing _ with + (one time) when parsing semantic versions from tags is a reasonable thing to do. I'd be willing to discuss fetching the annotations for all the OCI manifests, but I suspect that's undesirable from an efficiency point of view. I'd also be willing to add a verification of the org.opencontainers.image.version annotation on the actually selected tag, but I was trying to minimize the amount of load Flux induces while supporting build metadata in semver.

Signed-off-by: Evan Anderson <evan.k.anderson@gmail.com>
@evankanderson evankanderson force-pushed the oci-build-semver-sort branch from 76b4044 to 314c103 Compare June 17, 2025 00:35
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.

1 participant