-
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
kustomize: Add support for OCI based helm repos #5167
Conversation
Hi @jkroepke. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
7d2eb30
to
b90d861
Compare
This PR has multiple commits, and the default merge method is: merge. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go
Outdated
Show resolved
Hide resolved
/label tide/merge-method-squash |
/assign @koba1t /triage accepted |
/ok-to-test |
Hi @jkroepke This PR almost looks good to me. |
I run go fmt, that should be sufficient. I tried to run make lint, but it got killed because of OOM. |
Do we have an ETA for this to be released? |
I found the below error when running on my laptop. Could you fix it?
|
Done |
Thanks! |
/cc @natasha41575 |
Beautiful! FYI: I’m adding it into ArgoCD over at: |
Is this not working with GHCR? The repo is public? helmCharts:
- name: csi-proxmox
repo: oci://ghcr.io/sergelogvinov/charts/proxmox-csi-plugin
version: 0.1.15 # https://ghcr.io/sergelogvinov/charts/proxmox-csi-plugin
releaseName: csi-proxmox
namespace: csi-proxmox
|
I think you made a mistake in your
https://kubectl.docs.kubernetes.io/references/kustomize/builtins/#_helmchartinflationgenerator_ |
Doi, Thank you :) |
Hello, I have the same problem with my setup to Azure Container Registery:
The error message is also similar:
|
According to your error message, you failed to exec |
This works fine on my local computer. I'm able to run helm pull:
I have also tested the chart with a ArgoCD application and that works fine with the kubernetes secret passed to my ArgocD instance:
|
I apologize for not knowing the details of ArgoCD. Do you use any credentials to pull helm charts? |
To get access to the private ACR, I need some form of authentication, and creating helm credentials with a Kubernetes secret has been sufficient to get access with ARgoCD. In the link you sent, it says: "We will not add support for:
OCI registries are now supported. Are there no planned features for enabling private repositories or registry authentication? This would help us a lot and simplify the setup for our developers. |
Sorry, we don't have a plan to add more functions to helmCharts now. We discuss in this issue about the features of Helm support. Please check, If you have your opinions. |
FYI I put some observations/possible followups on this (private oci support): #5407 (comment) and there is two possibles (ugly) workaround that you could do with existing versions |
I think the above issues are related to this ticket: #5407 My workaround for the time being is to run kustomize build in CI (with a short bash script as a workaround to auth to my private helm registry), generate a manifest.lock.yaml containing the entire k8s manifest, and have Argo cd look at that directly. Essentially move the kustomize build step from ArgoCD to CI instead, since I have more control there. This is also consistent with the rendered manifests pattern: With all that said, I really think that kustomize should respect the local Helm credentials, as mentioned in the issue I linked above |
Thank you for the feedback. I saw the workarounds, and there is the possibility to add them with a config map to the ArgoCD instance, but I think we will have to use another approach until this is supported. Using the workaround provided in the ticket #5407 will fix the problem, but it is not the cloud-native way that we prefer to do things. I think we will have to stick with ArgoCD applications and helm integration until this is supported. |
About the authentication issues, you can use helm login, crane login or docker login before running kustomize. The helm OCI integration will re-use the docker credentials for authentication. If you are running private ACR with Azure RBAC, consider to use From my point of view, it's not necessary to integrate the login functionality in kustomize. |
Did you tested that? My experience about this is that helm launched through kustomize is not able to use the docker config/credential... |
Tested with ghcr.io. Works fine. Additionally, I run docker logout ghcr.io after testing and I got auth errors back. It also works with |
Actually it does seems to work with helm 3.13.3 indeed thanks! Pretty sure there is something that affected the usage of helm through kustomize that got fixed at the helm level in the last couple of months as I was not alone affected by this so it would be weird that we all messed up at the same time 🤔. Anyway looks fixed to me! |
Is there an update from v3.13.2 to v3.13.3 that has fixed the authentication issues?
|
Thats a topic for ArgoCD, isn't it? |
It is kustomize that doesn't support private OCI registries, so the issue needs to be fixed there and not in ArgoCD. This feature request is only to make kustomize more compatible with ArgoCD and Helm. It is possible to add a workaround, but it is not very cloud-native. Take a look at this issue; might clear up why this is a kustomize problem and not an ArgoCD error: |
It does support it. See above. ArgoCD is should provide the authenticated context. Argo does this for helm, too. You can also run helm registry login before running kustomize. There is already a linked PR at the ArgoCD issue. |
We specifically want support for helm OCI repos kubernetes-sigs/kustomize#5167 which landed in kustomize 5.2.1 but might as well upgrade to latest.
Bitnami recently change from classical helm repositories to OCI based repositories, which may have an impact of the support for helm charts from OCI repositories.
this PR add support for fetch charts from OCI repositories.
Example:
This PR does not implement a breaking change.
Fixes #4381
ref #4614