https://github.com/lazychanger/helm-viv
Helm plugin to use variable in values
https://github.com/lazychanger/helm-viv
helm helm-plugin variable-in-values viv
Last synced: about 1 month ago
JSON representation
Helm plugin to use variable in values
- Host: GitHub
- URL: https://github.com/lazychanger/helm-viv
- Owner: lazychanger
- License: mit
- Created: 2022-10-12T10:08:24.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T12:07:50.000Z (over 2 years ago)
- Last Synced: 2024-11-07T12:52:19.427Z (11 months ago)
- Topics: helm, helm-plugin, variable-in-values, viv
- Language: Go
- Homepage:
- Size: 422 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Helm-variable-in-values
Part of the code in this repository comes from [helm](https://github.com/helm/helm)
and [helm-cm-push](https://github.com/chartmuseum/helm-push).## Install
```shell
helm plugin install https://github.com/lazychanger/helm-viv
```### version
```shell
helm viv version
```## Usage
### 1. Create viv-chart project
```shell
helm create example
```### 2. Add your variable-in-values to `vivs/xxx.yaml`
**values.yaml**
```yaml
...subChart:
serviceSelector:
name:subChart2:
# realname is <.ReleaseName>-<.Values.subChart2.serviceName>
serviceName: subChart
```**vivs/overrideSubChartServiceName.yaml**
```yaml
subChart:
serviceSelector:
name: "{{ .Release.Name }}.{{ .Values.subChart2.serviceName }}"
```### 3. Install
```shell
$ 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**
```shell
$ helm viv template --generate-name exmaple/simple-exmaple -f ./values.yaml --debug
```**example/simple-example directory**
```shell
$ 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 |