-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
helm chart dependencies fail to download from private repo #6477
Comments
i had the same issue and found a workaround by mounting the ca-store of my kubernetes nodes which includes our root ca into the pods. For example the with the following values of the argocd helm chart :
same for repoServer and Server. we use centos7 on our hosts so your host path may vary. |
I confirm the workaround described above works for #13154 as well. |
@jannfis explain issue. |
If you have an OCI registry for your helm chart, It appears that the reason the work around is needed is helm doesn't support adding oci repositories via "helm repo add" Hence when argo uses: helm dependency build, helm attempts to download the oci helm chart but without a repo entry certs aren't used and it fails. If you do a helm pull, passing in the --ca-file option to helm it can successfully pull down the chart. This actually appears a limitation of helm. Though looking at the documentation, a dependency update should work with oci registries (see https://helm.sh/docs/topics/registries/#specifying-dependencies) but the code doesn't support it with helm/helm#12600 being the helm tracking task. Hence as of 5/Nov/23 the only work around is to override the container level CA so that openssl uses the system certs. There is no way to ignore the certs/override the certs in helm otherwise. |
Instead of injecting the ca-bundle via ConfigMap/hostPath to # syntax=docker/dockerfile:1.9
# image tag is automatically updated by renovate
FROM quay.io/argoproj/argocd:v2.12.2
# Changes to ca-certificates require root permissions
USER root
# Copy and install our custom root certificate
COPY --link company-ca.crt /usr/local/share/ca-certificates/company-ca.crt
RUN <<eol
#!/usr/bin/bash
set -e
chmod 644 /usr/local/share/ca-certificates/company-ca.crt
update-ca-certificates
eol
# Change back to the argocd user. $ARGOCD_USER_ID is defined in base image:
USER $ARGOCD_USER_ID The whole process is automated using Renovate and images:
# Use custom image with our root cert built-in:
- name: quay.io/argoproj/argocd
newName: our-internal-oci-repo.local/platform/ems-argo-cd |
That works for me. Thanks you for sharing it!. |
If you are trying to resolve an environment-specific issue or have a one-off question about the edge case that does not require a feature then please consider asking a question in argocd slack channel.
Checklist:
argocd version
.Describe the bug
If using a private helm chart repo with an internally signed cert there does not seem to be away to use chart dependencies.
I can add a cert and the private repo and deploy a chart directly from the repo ok but if the chart includes a dependency it cannot download it during the
helm dependency build
command.I'm following this guide https://www.openshift.com/blog/continuous-delivery-with-helm-and-argo-cd where i'd basically like to have a list of subcharts in git where I can bump the versions. This is because the deps are built and published by various third parties where I dont have the src as such.
To Reproduce
Add a private chart repo and corresponding ca cert.
Add a git repo with a chart like the following:
Create an app and try to sync it.
Expected behavior
I would hope that both the login and tls cert would be used for the private repo but I guess this is maybe an edge case and argo isnt handling this. Is this supposed to work or is my approach unusual? I suppose I could get some real publicly signed certs but I'm trying a POC in minikube currently so didnt want to do that. I do wonder if it would then simply fail on authentication to the private repo anyways?
Version
Logs
The text was updated successfully, but these errors were encountered: