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

fix: replace + with _ in Chart.Version #686

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

jfroy
Copy link
Contributor

@jfroy jfroy commented Jun 11, 2024

When using Flux with the OCI chart, the chart version has a git hash
suffix (ex: 1.0.107+20eb5010550b), which is invalid as a metadata label.

When using Flux with the OCI chart, the chart version has a git hash
suffix (ex: 1.0.107+20eb5010550b), which is invalid as a metadata label.
Copy link

@jfroy Images are available for testing. docker pull ghcr.io/stakater/reloader:SNAPSHOT-PR-686-5d6309b9\ndocker pull ghcr.io/stakater/reloader:SNAPSHOT-PR-686-UBI-5d6309b9

@MuneebAijaz
Copy link
Contributor

@jfroy can you provide more details around the issue? and if possible, do provide the FluxCD CRs you are applying

@jfroy
Copy link
Contributor Author

jfroy commented Jun 12, 2024

@jfroy can you provide more details around the issue? and if possible, do provide the FluxCD CRs you are applying

When using the recommended Flux 2.3 chartRef method to install an OCI helm chart, Flux sets the git hash as the chart semantic version metadata, which yields a version string of the form "major.minor.patch+git", per the SemVer spec.

Unfortunately, this yields an invalid Kubernetes label, and charts that include their version as a label will fail to install. The fix is generally to substitute the '+' for a '_', as suggested in the Flux CHANGELOG. Other charts have followed this approach, such as Kyverno.

Here is my HelmRelease and OCIRepository.

jfroy added a commit to jfroy/flatops that referenced this pull request Jun 17, 2024
The reloader chart cannot be used with OCIRepository right now. See
stakater/Reloader#686.

This reverts commit 149826c.
@MuneebAijaz
Copy link
Contributor

hi @jfroy thanks for providing context, i will get back to this soon

@MuneebAijaz MuneebAijaz merged commit 0bcf8cb into stakater:master Jun 21, 2024
5 checks passed
jfroy added a commit to jfroy/flatops that referenced this pull request Jun 24, 2024
Upstream merged fix. See stakater/Reloader#686

This reverts commit 52eb7a6.
@jfroy jfroy deleted the oci-invalid-version branch July 1, 2024 15:55
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.

2 participants