Skip to content

Latest commit

 

History

History
93 lines (72 loc) · 1.98 KB

Readme.md

File metadata and controls

93 lines (72 loc) · 1.98 KB

Helm-variable-in-values

Part of the code in this repository comes from helm and helm-cm-push.

Install

helm plugin install https://github.com/lazychanger/helm-viv

version

helm viv version

Usage

1. Create viv-chart project

helm create example

2. Add your variable-in-values to vivs/xxx.yaml

values.yaml

...

subChart:
  serviceSelector:
    name:

subChart2:
  # realname is <.ReleaseName>-<.Values.subChart2.serviceName>
  serviceName: subChart

vivs/overrideSubChartServiceName.yaml

subChart:
  serviceSelector:
    name: "{{ .Release.Name }}.{{ .Values.subChart2.serviceName }}"

3. Install

$ helm viv install --generate-name exmaple/simple-exmaple -f ./values.yaml --dry-run

Debug

add --debug to your command, and then you can see vivTemp dir in your chart.

command

$ helm viv template --generate-name exmaple/simple-exmaple -f ./values.yaml --debug

example/simple-example directory

$ tree ./example/simple-example

#./example/simple-example
#├── Chart.lock
#├── Chart.yaml
#├── charts
#│   └── ingress-0.1.0.tgz
#├── templates
#│   ├── NOTES.txt
#│   ├── _helpers.tpl
#│   ├── deployment.yaml
#│   ├── hpa.yaml
#│   └── serviceaccount.yaml
#├── values.yaml
#├── vivTemp
#│   ├── _charts_ingressAlias_charts_service_vivs_values.yaml
#│   ├── _charts_ingressAlias_vivs_values.yaml
#│   ├── vivs_autoscaling.yaml
#│   └── vivs_values.yaml
#└── vivs
#    ├── autoscaling.yaml
#    └── values.yaml

Config

Env

name default desc
HELM_VIV_HELMBIN helm use helmbin when viv proxy helm command