I am trying to install memcached from helm charts stable repo
My requirements.yaml file looks like this
- name: stable/memcached
repository: https://charts.helm.sh/stable
version: 2.7.1
I am getting this error:
Error: stable/rabbitmq chart not found in repo https://charts.helm.sh/stable
I tried this on my computer
helm repo add stable https://charts.helm.sh/stable
helm search memcached --versions | grep 2.7.1
and I can see
stable/memcached 2.7.1 1.5.12 Free & open source, high-performance, distributed memory ...
Can someone advice why I am seeing this error?
I have just replaced the chart name in my requirements.yaml file
- name: memcached
repository: https://charts.helm.sh/stable
version: 2.7.1
Related
This is my chart:
name: zookeeper
version: 1.0.0
dependencies:
- name: bitnami/zookeeper
version: 3.8.1
repository: https://charts.bitnami.com/bitnami
This is what my helm search repo zookeeper produces:
NAME CHART VERSION APP VERSION DESCRIPTION
bitnami/zookeeper 11.1.2 3.8.1 Apache ZooKeeper provides a reliable, centraliz...
my-repo/zookeeper 11.1.2 3.8.1 Apache ZooKeeper provides a reliable, centraliz...
But when I try to fetch my dependencies, it says the chart doesn't exist:
$ helm dependency build [11:50:45]
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "my-repo" chart repository
...Successfully got an update from the "bitnami" chart repository
Update Complete. ⎈Happy Helming!⎈
Error: bitnami/zookeeper chart not found in repo https://charts.bitnami.com/bitnami
Why? It's there, so why won't it fetch it?
thanks
I had to change the name from bitnami/zookeeper to zookeeper in my chart since that's how it's defined in the base chart
I am wondering and apparently have not yet found anywhere if there is a way via which I can specifically override the value of "version" key's value from the dependencies chart in Helm
# Chart.yaml
dependencies:
- name: bitnami/postgresql
version: **"8.10.5"**
repository: "https://charts.bitnami.com/bitnami"
I tried something like below:
# Chart.yaml
dependencies:
- name: bitnami/postgresql
version: "{{.Values.postgresql.version}}"
repository: "https://charts.bitnami.com/bitnami"
and
# Values.yaml
postgreSQL:
version: "8.10.5"
But I am getting below error:
Error: cannot load Chart.yaml: error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{".Values.postgresql.version":interface {}(nil)}
If this is currently not possible then can someone advise how do you update the "version" of dependencies in Charts.yaml whenever new version is available of them?
It's not super well documented in the Helm documentation – the generic helm dependency command documentation mentions it, but not the main discussion of chart dependencies – but the version: field is optional, and it uses semantic versioning if it is present. Helm maintains a separate Chart.lock file that lists precise versions of chart dependencies, and the helm dependency update command will update that file.
So for your uses you might say:
dependencies:
- name: bitnami/postgresql
version: '^8' # Any 8.x.x version, but not version 7 or 9
repository: "https://charts.bitnami.com/bitnami"
Or, if you're not configuring the dependency chart at all, just leave out the version: line entirely and use whatever the latest version is.
# Install the chart using the specific Chart.lock version
helm install myservice .
# Get a newer version in Chart.lock and upgrade the database
rm Chart.lock
helm dependency update
helm upgrade myservice .
Do check the Chart.lock file into source control, so you have reproducible deployments.
All of this is also true if you're using the older, Helm v2-compatible layout that lists dependencies in a separate requirements.yaml file. In this case the lock file is requirements.lock, but version: is still a semantic version constraint and the same helm dependency commands update the lock file.
Your approach won't work, because the template engine ({{ .Values.myvar }}) works only in the template folder.
# Chart.yaml
dependencies:
- name: bitnami/postgresql
version: "{{.Values.postgresql.version}}" # Won't be replaced
repository: "https://charts.bitnami.com/bitnami"
I am afraid that the helm team won't change this behaviour according to this discussion:
https://github.com/helm/helm/issues/2492
Apperantly the only way I can think of, is to replace the version with a shell script and afterwards calling the helm commando.
sed -i 's/version: "[0-9].[0-9].[0-9]"/version: "9.9.9"/' Chart.yaml
helm install ....
▶ helm version --tls
Client: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
~
▶ helm repo list
NAME URL
stable https://kubernetes-charts.storage.googleapis.com
incubator https://storage.googleapis.com/kubernetes-charts-incubator
stakater https://stakater.github.io/stakater-charts
flagger https://flagger.app
bitnami https://charts.bitnami.com/bitnami
~
▶ helm repo update --debug
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "flagger" chart repository
...Successfully got an update from the "stakater" chart repository
...Successfully got an update from the "incubator" chart repository
...Successfully got an update from the "bitnami" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈
~
▶ helm search repo bitnami/postgresql
No results found
~
▶ helm search repo bitnami/mariadb -l
No results found
However this works (have to escape ~ on zsh)
▶ helm search postgresql --version \~8.9.0
NAME CHART VERSION APP VERSION DESCRIPTION
bitnami/postgresql 8.9.9 11.8.0 Chart for PostgreSQL, an object-relational data...
How can I specify a repo to search in?
It looks like the Helm repo search functionality only available since v3.0.0.
Even I tried using the latest v2.16.7 version, still no luck.
$ helm version
Client: &version.Version{SemVer:"v2.16.7", GitCommit:"5f2584fd3d35552c4af26036f0c464191287986b", GitTreeState:"clean"}"
$ helm repo add bitnami https://charts.bitnami.com/bitnami
"bitnami" has been added to your repositories
$ helm repo update --debug
Hang tight while we grab the latest from your chart repositories...
...Skip local chart repository
...Successfully got an update from the "stable" chart repository
...Successfully got an update from the "bitnami" chart repository
Update Complete.
$ helm repo list
NAME URL
stable https://kubernetes-charts.storage.googleapis.com
local http://127.0.0.1:8879/charts
bitnami https://charts.bitnami.com/bitnami
$ helm search repo bitnami/postgresql
No results found
But it works well with version 3.0.0 or above.
$ helm version
version.BuildInfo{Version:"v3.0.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}
$ helm repo add bitnami https://charts.bitnami.com/bitnami
"bitnami" has been added to your repositories
$ helm repo update --debug
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "bitnami" chart repository
Update Complete. ⎈ Happy Helming!⎈
$ helm repo list
NAME URL
bitnami https://charts.bitnami.com/bitnami
$ helm search repo bitnami/postgresql
NAME CHART VERSION APP VERSION DESCRIPTION
bitnami/postgresql 8.10.2 11.8.0 Chart for PostgreSQL, an object-relational data...
bitnami/postgresql-ha 3.2.7 11.8.0 Chart for PostgreSQL with HA architecture (usin...
I have installed a helm chart with subcharts and I want to find out which version of the subchart is installed. Is there any possible way in helm 3?
Following official Helm documentation:
Helm.sh: Subcharts and globals
Helm.sh: Charts
Helm.sh: Helm dependency
You can get the version of a subchart used by a chart by following below example:
Download the chart with $ helm pull repo/name --untar
Go inside the chart directory
Invoke command: $ helm dependency list
You can get a message that there are no dependencies:
WARNING: no dependencies at gce-ingress/charts
You can also get a message with dependencies and their versions:
NAME VERSION REPOSITORY STATUS
kube-state-metrics 2.7.* https://kubernetes-charts.storage.googleapis.com/ unpacked
Additionally you can check the content of the prometheus/charts/kube-state-metrics/Chart.yaml for additional information.
Please let me know if that helped you.
Delete the cached archive to force a redownload:
rm -rf ~/.helm/cache/archive/cp-helm-charts-0.1.0.tgz
Do an explicit repo update
helm repo update
Do a debug/dry-run install to force a download:
helm install --debug --dry-run confluent/cp-helm-charts > /dev/null
Look at the specific file in the .tgz archive where I want to see the fix:
tar xfO ~/.helm/cache/archive/cp-helm-charts-0.1.0.tgz cp-helm-charts/charts/cp-kafka/templates/statefulset.yaml | grep -n -C10 volumes:
Compare to the latest version on github, which was modified 8 days ago:
https://github.com/confluentinc/cp-helm-charts/blob/master/charts/cp-kafka/templates/statefulset.yaml#L140
The github version has - name: datadir-0. The version Helm pulls just has - name: datadir without the trailing -0.
Why does the .tgz file that Helm pulls not have the latest fix in the master branch version on github? How do I fix this?
FYI, my relevant environment information:
helm version
Client: &version.Version{SemVer:"v2.12.2", GitCommit:"7d2b0c73d734f6586ed222a567c5d103fed435be", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.12.2", GitCommit:"7d2b0c73d734f6586ed222a567c5d103fed435be", GitTreeState:"clean"}
helm repo list
NAME URL
stable https://kubernetes-charts.storage.googleapis.com
local http://127.0.0.1:8879/charts
confluent https://confluentinc.github.io/cp-helm-charts/
The chart maintainer is distributing a .tgz chart that is not up to date with recent git commits. They recommend you build your own chart .tgz.