Helm, customicing only certain values

11/18/2020

I want to deploy nextcloud with helm and a custom value.yaml file that fits my needs. Do i have to specify all values given from the original value.yaml or is it possible to only change the values needed, Eg if the only thing I want to change is the host adress my file can look like this:

nextlcoud:
    host: 192.168.178.10

instead of copying this file and changing only a few values.

-- 8bit
kubernetes
kubernetes-helm

2 Answers

11/19/2020

you misspelled the nextcloud to nextlcoud in your value file.

-- Kun Li
Source: StackOverflow

11/30/2020

As the underlying issue was resolved by the answer of user @Kun Li, I wanted to add some examples when customizing Helm charts as well as some additional reference.

As asked in the question:

Do i have to specify all values given from the original value.yaml or is it possible to only change the values needed

In short you don't need to specify all of the values. You can change only some of them (like the host from your question). The ways to change the values are following:

  • Individual parameters passed with --set (such as helm install --set foo=bar ./mychart)
  • A values file if passed into helm install or helm upgrade with the -f flag (helm install -f myvals.yaml ./mychart)
  • If this is a subchart, the values.yaml file of a parent chart
  • The values.yaml file in the chart

You can read more about it by following official Helm documentation:

A side note!

Above points are set in the order of priority. The first one (--set) will have the highest priority to override the values.


Example

A side note!

This examples assume that you are in the directory of a pulled Helm chart and you are using Helm v3

Using the nextcloud Helm chart used in the question you can set the nextcloud.host value by:

  • Pulling the Helm chart and editing the values.yaml
  • Creating additional new-values.yaml to pass it in (the values.yaml from Helm chart will be used regardless with lower priority):
    • $ helm install NAME . -f new-values.yaml

new-values.yaml

nextcloud:
  host: 192.168.0.2
  • Setting the value with helm install NAME . --set nextcloud.host=192.168.0.2

You can check if the changes were done correctly by either:

  • $ helm template . - as pointed by user @David Maze
  • $ helm install NAME . --dry-run --debug
-- Dawid Kruk
Source: StackOverflow