-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
helmCharts
repo field doesn't work with OCI registry
#4381
Comments
helmCharts
repo field doesn't work with OCI protocolhelmCharts
repo field doesn't work with OCI registry
Helm 3.8.0 was just released with the new OCI support moved to 'production' status - this implements the changes that was done in 3.7.1 as stable (no longer experiemental env needed to use it in Helm) :) |
I upgraded to helm 3.8.0 and am getting the same error. The use of
Can pull without specifying
Cannot pull with
This seems to be the issue. Maybe if the repo is |
I am unable to make a MR because I can't sign the CLA but can someone make this MR for me? func (p *HelmChartInflationGeneratorPlugin) pullCommand() []string {
args := []string{
"pull",
"--untar",
"--untardir", p.absChartHome(),
- "--repo", p.Repo
- p.Name}
+ }
if p.Version != "" {
args = append(args, "--version", p.Version)
}
+ if strings.HasPrefix(p.Repo, "oci://") {
+ args = append(args, p.Repo)
+ } else {
+ args = append(args, "--repo", p.Repo)
+ args = append(args, p.Name)
+ }
return args
} This is untested, but |
If anyone takes the above patch, I think they should note the trailing comma needs fixing: - "--untardir", p.absChartHome(),
+ "--untardir", p.absChartHome()
|
These fixes update the HelmChartInflation tool so that it works with Helm 3 These changes are related to issues kubernetes-sigs#4381 and kubernetes-sigs#4335 on the kustomize github
It'd be greatly appreciated if this fix is deployed soon! |
To be fair, this work is required because the Helm team doesn't follow |
@minnie-jeong-otsk I created a patch here and also published a release for this patch on my fork of kustomize (download the patched binary here). This patch works for us to pull Note that this release is NOT officially supported by kustomize. |
The Helm plugin builtin into kustomize is being migrated to a third party KRM extension, in which we will support OCI [issue]. I will try to prioritize the migration and make some progress for OCI support in Q2 given that there are a large number of requests for this. /triage accepted |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
Based off of this comment, it appears that the helm chart inflation tool is supporting bug fixes and adding fields that are normally supported through Edit: Never-mind... I didn't read the "we will not support OCI or private registries"... That is sad. I would consider being incompatible with Helm 3.8.0 features (which has been released for almost a year now) a bug... |
I have tried the issue is still present. Does any one when they would consider to fix this problem or it going to be never? |
will this problem be solved soon? |
Bump |
Any reason we can't reconsider one of the other pull requests that address this as a short term solution while the long term vision is still being planned? https://github.com/kubernetes-sigs/kustomize/pull/4614/files |
There are PRs to fix this problem in kustomize. KRM is touted as the eventual solution, but has not had a commit in over 9 months... |
@mikebz i'll dare you free blowjob if you close this shit, dude >_< |
While it is stated under Long term support that
I would kindly ask you to reconsider this opinion, given that the fix actually is just +7-2 LOC and the krm function does not support this yet, either and is not production-ready it seems. |
@kosta nevertheless it uses widely by Yandex.Cloud: site:cloud.yandex.ru "oci:" for example. |
I think there is a concern about backwards compatibility here, but the backwards compatibility issue was a side effect of the previous implementation and not an advertised feature. My vote is to move forward with the proposed PR. |
As another ugly workaround, I found the solution: where #!/bin/bash
if [[ $@ = pull* ]]; then
# If the command is `helm pull (..)` skips --repo flag and chartName
# from command line args to make helm pull run
# For explanation:
# https://github.com/kubernetes-sigs/kustomize/issues/4381
arr=(${@//--repo/}); # Skipping --repo
args="${arr[@]:0:5} ${arr[@]:6}"; # Skipping chartName
else
args="$@"
fi
cmd="/usr/bin/helm --registry-config ~/.config/helm/registry/config.json $args"
echo "Running '$cmd' " >> /tmp/helm-debug
eval $cmd |
any update on this issue? this will be a great feature for kustomize and it will expand kustomize's adaptations |
Up! |
No, it's not in yet. This MR is not against the actual |
@natasha41575 I'd like to check my understanding of this issue. Initially, we planned to support this patch in the KRM Helm function, which would've had increased feature-freedom because of its independence from Kustomize. When progress on KRM functions slowed, we limited Just to confirm, we are still open to this patch on |
@natasha41575 @QuinnBast or anyone else on this thread: Stemming from my lack of understanding of Helm, is Helm's inability to pull charts with the
@natasha41575 If this is a Helm bug, I assume we're patching it in Kustomize instead of Helm as a short-term workaround for users? |
@annasong20 discussed offline - we will add support in kustomize for oci registries by having the different commands running that helm provides for oci-based charts. |
is this fixed? I still cant use OCI registry with kustomize |
Yes it is working. I use it like this::
A few days ago I thought it wasn't working either, until I found out that I had entered the wrong repo URL 🤦 When you do that, you get an auth error that sends you on the wrong track. |
Describe the bug
Kustomize fails to pull charts through
helmCharts
yaml that are hosted within an OCI registry.** Example **
Create a
kustomize.yaml
file:Run the command
kustomize build --enable-helm --helm-command $helmCommand ./folder
Kustomize will fail to pull the helm chart and produce the following error:
Running a regular
helm pull
works fine on the registry, but pulling with--repo
causes issues:I also cannot work around this by just adding it as a repo:
Expected output
Expected Kustomize to be able to pull the chart and apply the
values.yaml
to the chart. The solution would be foroci://
urls, to not use the--repo
flag when performing a helm pull.Kustomize version
$ kustomize version
{Version:kustomize/v4.3.0 GitCommit:cd17338759ef64c14307991fd25d52259697f1fb BuildDate:2021-08-24T19:24:28Z GoOs:linux GoArch:amd64}
$ helm version
version.BuildInfo{Version:"v3.7.2", GitCommit:"663a896f4a815053445eec4153677ddc24a0a361", GitTreeState:"clean", GoVersion:"go1.16.10"}
Platform
Ubuntu
The text was updated successfully, but these errors were encountered: