Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are helm charts stored locally?

I'm trying to make changes to the values.yaml of a helm chart from a repository. After adding the repository and successfully installing the chart locally, I cannot find it. I realize this question asks the same, but the answer there does not work for me; I ran helm install in my home directory, but the chart is not there.

like image 868
dfvdgrsdfgsdfg Avatar asked Jul 15 '20 21:07

dfvdgrsdfgsdfg


People also ask

Where are local Helm charts stored?

Helm charts are stored in chart repositories that are hosted in container registries, either on a local system or online.

Where should Helm charts be stored?

All template files are stored in a chart's templates/ folder. When Helm renders the charts, it will pass every file in that directory through the template engine.

Where is my local Helm repo?

The official Helm repo URL is https://kubernetes-charts.storage.googleapis.com . This repo is mainteined on GitHub and it's URL is https://github.com/helm/charts. So the best approach is to clone the official repo github and work on it locally.

Where does Helm store its configuration?

In Helm 2, releases are stored as ConfigMaps (default) or Secrets in the cluster under the Tiller namespace, kube-system (default). The Helm Release object is stored in the data. release field of the Configmap or Secret as a base-64 encoded, gzipped archive.


3 Answers

helm env

Will list all of the paths

HELM_BIN="helm"
HELM_CACHE_HOME="/Users/username/Library/Caches/helm"
HELM_CONFIG_HOME="/Users/username/Library/Preferences/helm"
HELM_DATA_HOME="/Users/username/Library/helm"
HELM_DEBUG="false"
HELM_KUBEAPISERVER=""
HELM_KUBEASGROUPS=""
HELM_KUBEASUSER=""
HELM_KUBECAFILE=""
HELM_KUBECONTEXT=""
HELM_KUBETOKEN=""
HELM_MAX_HISTORY="10"
HELM_NAMESPACE="default"
HELM_PLUGINS="/Users/username/Library/helm/plugins"
HELM_REGISTRY_CONFIG="/Users/username/Library/Preferences/helm/registry.json"
HELM_REPOSITORY_CACHE="/Users/username/Library/Caches/helm/repository"
HELM_REPOSITORY_CONFIG="/Users/username/Library/Preferences/helm/repositories.yaml"
like image 58
Levon Avatar answered Oct 25 '22 09:10

Levon


Helm is very flexible and allow you to install from the repository and also locally.

What you are trying is to edit a values.yaml from something that is in a remote repository and this is not possible.

What you need to do is to clone the repository to your local storage and than use it locally.

Example:

Lets assume you want to use NGINX Controller that is available in the official Helm Repository.

The official Helm repo URL is https://kubernetes-charts.storage.googleapis.com. This repo is mainteined on GitHub and it's URL is https://github.com/helm/charts.

So the best approach is to clone the official repo github and work on it locally.

$ git clone https://github.com/helm/charts.git

This is going to copy all data from the github repository to your local storage under chart directory.

If you inspect the structure you will find NGINX Ingress under /charts/stable/nginx-ingress and if you list the content of this directory you can find values.yaml.

$ ls -la
total 88
drwxr-xr-x   4 christofoletti christofoletti  4096 Jul 16 08:20 .
drwxr-xr-x 283 christofoletti christofoletti 12288 Jul 16 08:20 ..
-rw-r--r--   1 christofoletti christofoletti   539 Jul 16 08:20 Chart.yaml
drwxr-xr-x   2 christofoletti christofoletti  4096 Jul 16 08:20 ci
-rw-r--r--   1 christofoletti christofoletti   333 Jul 16 08:20 .helmignore
-rw-r--r--   1 christofoletti christofoletti    76 Jul 16 08:20 OWNERS
-rw-r--r--   1 christofoletti christofoletti 31130 Jul 16 08:20 README.md
drwxr-xr-x   3 christofoletti christofoletti  4096 Jul 16 08:20 templates
-rw-r--r--   1 christofoletti christofoletti 16771 Jul 16 08:20 values.yaml

After making all changes you need/want, you can install it using helm as follows from inside charts directory:

user@minikube:~/charts/stable/nginx-ingress$ cd ../../
user@minikube:~/charts$ helm install --name my-release stable/nginx-ingress

So as you can see, you have to identify where are the sources of the repository you are using to e able to clone it.

If you have trouble to identify it, please let me know so I can try to identify.

like image 11
Mark Watney Avatar answered Oct 25 '22 10:10

Mark Watney


By default, the default directories depend on the Operating System. The defaults are listed below:

enter image description here

Source: Helm Official Documentation Site

like image 8
vijay Avatar answered Oct 25 '22 09:10

vijay