Skip to content

Add caBundle private CA to chart repository

Article Number: 000021400

Environment

Rancher 2.6.x
Rancher 2.7.x
Rancher 2.8.x

Situation

There are some cases where customers and users have their own custom charts and they would prefer to add them and use them in Rancher Server.
The UI has a section called "Repositories" where they simply add the repository in question and then it will become available in the Charts tab under the given name of that repository.
While adding the repository an error related to the invalidity of the certificate can appear like the following

"fatal: unable to access 'https://url.chart.repo/some-path/repo.git/': SSL certificate problem: unable to get local issuer certificate"

or

Get "https://docker.repo.local/chart/repo/index.yaml": x509: certificate signed by unknown authority

Cause

missing CA certificate when adding a custom or private chart repository.

Resolution

The custom CA certificate needs to be added to the ClusterRepo manifest, under the spec.caBundle field.
The documentation reference for that matter can be found here.