zapier / kubechecks

Check your Kubernetes changes before they hit the cluster
https://kubechecks.readthedocs.io/en/latest/
Mozilla Public License 2.0
147 stars 9 forks source link

401 Unauthorized - using private repositories as a git chart dependency (Aws Ecr) #183

Open orenlevi111 opened 4 months ago

orenlevi111 commented 4 months ago

https://github.com/zapier/kubechecks/blob/14e5941d83c60cc644de2441a459249bdf6ff4bd/pkg/argo_client/manifests.go#L76

Hey, getting the bellow exception:

ERR Unable to get manifests for in error="failed to generate manifests: helm dependency build failed exit status 1: Error: could not download oci://dkr.ecr..amazonaws.com/: pulling from host dkr.ecr..amazonaws.com failed with status code [manifests ]: 401 Unauthorized" event_id=595 repo=

Aws Ecr requires helm login before downloading the charts. and today I don't see any support for it. All of my charts are packaged and stored directly in aws Ecr. I can't use this tool without it. only the values files are stored in github.

djeebus commented 4 months ago

Currently we don't have any first-class support for authorizing helm repositories. You could possibly hack it in via mounting configmaps that contain the credentials in ~/.config/helm/repositories.yaml, but that might not work either. Happy to accept PRs to support the feature though!

orenlevi111 commented 4 months ago

fixed it in my fork, this is the PR: https://github.com/zapier/kubechecks/pull/200