Precedence of index.yaml versus chart manifests in git-based Rancher App repositories
Article Number: 000022087
Environment
Rancher v2.9+
Situation
Rancher supports git-based repositories in the Apps feature, enabling deployment of Helm charts into Rancher-managed clusters, from a git repository. An example of such a git repository is provided by the RKE2 cluster template examples at https://github.com/rancher/cluster-template-examples
Within an Apps git repository, two formats are supported:
- Un-archived and un-compressed Helm charts can be defined within sub-directories of the git repository, as in the example at https://github.com/rancher/cluster-template-examples/tree/main/charts
- Archived and compressed Helm charts can be included within the git-repository and referenced from a Helm index.yaml file, as in the example at https://github.com/rancher/cluster-template-examples/blob/main/index.yaml
If both formats are present in a single git repository, which takes precedence when Rancher loads available charts?
Resolution
When an index.yaml file is present on the repository, this takes precedence and Rancher will load the list of charts and the referenced chart archives from the index file. This skips the process of walking the repository directory to build the index dynamically from charts in sub-directories.