-
Notifications
You must be signed in to change notification settings - Fork 261
There's not a simple way to add a helm repo with a custom CA #17
Comments
@ipedrazas Would it be sufficient (if not ideal) to be able to specify a secret for certificates to be mounted, as well as the It looks like fluxcd/flux#1893 will let you specify a CA cert for a repository entry, which may help. |
fluxcd/flux#1893 allows you to define your own |
Is it possible to include the CA cert in the same secret that has the repositories.yaml? It requires knowing where the secret will be mounted, such that you can use the path in the repositories.yaml file. But I think it would work. |
Just wanted to leave a note in case anyone else goes down the rabbit hole here. It appears you should do something like the following. First create a ...
caFile: /root/.helm/certs/ca.crt
... for any repository using your new ca. Then run: Then use these values with the helm-operator helm chart (presented as yaml but you can get crazy with command line opts if you want... ...
configureRepositories:
enable: true
secretName: helm-repositories
extraVolumeMounts:
- name: repositories-yaml
mountPath: /root/.helm/certs/ca.crt
subPath: ca.crt obviously you can tweak this for multiple certificate authorities or just move stuff around as you like. Note: Your HelmRelease should continue to use the url of the repo not the name. |
It's not easy to add your own repository configuration to the chart.
The setting
Values.helmOperator.configureRepositories.enable
allow you toinject a secret, however, if there's a repo that needs a CA there's not a standard way to add the CA into the deployment provided by the chart.Note that
Values.helmOperator.tls.verify
is used as a flag to configuretiller
tls and not repo.If you jump into the helmOperator pod and create the file
ca.crt
and then execute:helm repo add myrepo https://myhelmrepo.com --ca-file ca.crt
the
HelmRelease
can use a helm repo with a self-signed cert. This means that the operator needs 2 things to install releases from a helm repo under a self-signed cert:repositories.yaml
with the location of the ca certificate.The text was updated successfully, but these errors were encountered: