doc(team): changed the sub-helmfile as template (#524)

try to make the doc more clear.
This commit is contained in:
sgandon 2019-04-01 00:41:11 +02:00 committed by KUOKA Yusuke
parent 14a392666e
commit 57df25c3ff
1 changed files with 6 additions and 14 deletions

View File

@ -121,7 +121,7 @@ releases:
You can go even further by generalizing the product related releases as a pair of `api` and `web`:
`product/helmfile.yaml`:
`shared/helmfile.yaml`:
```yaml
releases:
@ -133,28 +133,20 @@ releases:
# snip
```
And reusing it from the two product helmfiles:
Then you only need one single product helmfile
`product1/helmfile.yaml`:
`product/helmfile.yaml`:
```yaml
helmfiles:
- ../observability/helmfile.yaml
- ../product/helmfile.yaml
```
`product2/helmfile.yaml`:
```yaml
helmfiles:
- ../observability/helmfile.yaml
- ../product/helmfile.yaml
- ../shared/helmfile.yaml
```
Now that we use the environment variable `PRODUCT_ID` to as the parameters of release names, you need to set it before running `helmfile`, so that it produces the differently named releases per product:
```console
$ PRODUCT_ID=1 helmfile -f product1/helmfile.yaml apply
$ PRODUCT_ID=2 helmfile -f product2/helmfile.yaml apply
$ PRODUCT_ID=1 helmfile -f product/helmfile.yaml apply
$ PRODUCT_ID=2 helmfile -f product/helmfile.yaml apply
```