flux-check-hook
flux-check-hook copied to clipboard
Private Helm Repository cannot be reached
Issue
If a Helm repository requires authentication to access, the pre-commit hook is unable to access it.
Error: looks like "https://charts.private.repo.test/" is not a valid chart repository or cannot be reached: failed to fetch https://charts.private.repo.test/index.yaml : 401 Unauthorized
Reproduction
Add HelmRepository
resource that requires authentication for access. For example:
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
name: myrepo
namespace: flux-system
spec:
interval: 1m0s
url: https://charts.private.repo.test/
secretRef:
name: helmrepo-credentials
FYI https://github.com/helm/helm/pull/9760 might resolve this issue
thanks for pointing this out, the linked issue looks like a great way to solve this, I think it's not worth doing anything without that, it would be quite complex trying to figure out the username and password from the secretRef