Can I have multiple values.yaml files for Helm

后端 未结 3 1775
夕颜
夕颜 2021-01-31 08:03

Can I have multiple values.yaml files in a Helm chart?

Something like mychart/templates/internalValues.yaml, mychart/templates/customSett

3条回答
  •  太阳男子
    2021-01-31 08:43

    Yes, it's possible to have multiple values files with Helm. Just use the --values flag (or -f).

    Example:

    helm install ./path --values ./internalValues.yaml --values ./customSettings.yaml
    

    You can also pass in a single value using --set.

    Example:

    helm install ./path --set username=ADMIN --set password=${PASSWORD}
    

    From the official documentation:

    There are two ways to pass configuration data during install:

    --values (or -f): Specify a YAML file with overrides. This can be specified multiple times and the rightmost file will take precedence

    --set (and its variants --set-string and --set-file): Specify overrides on the command line.

    If both are used, --set values are merged into --values with higher precedence. Overrides specified with --set are persisted in a configmap. Values that have been --set can be viewed for a given release with helm get values . Values that have been --set can be cleared by running helm upgrade with --reset-values specified.

提交回复
热议问题