Commit 80f51e69
80f51e697e24Merged
Дмитрий Жиляев <[email protected]> · 6 years ago · 5 files · +1 added · ~4 modified
Description
yaml
Details
- Commit
- 80f51e697e24
- Parent
- 64f8e4083908
README.mdmodifiedView file
@@ -11,8 +11,8 @@
1111
- `$ wget -o ...`1212
- `$ curl -o ...`1313
- Run as a container14-
- `$ docker run diamon/helmwave:0.1.4`15-
- `$ docker run --entrypoint=ash -it --rm --name helmwave diamon/helmwave:0.1.4`14+
- `$ docker run diamon/helmwave:0.1.5`15+
- `$ docker run --entrypoint=ash -it --rm --name helmwave diamon/helmwave:0.1.5`1616
1717
### Build1818
@@ -34,7 +34,7 @@
3434
3535
```yaml3636
project: my-project37-
version: 0.1.437+
version: 0.1.53838
3939
4040
repositories:@@ -86,7 +86,7 @@
8686
8787
```yaml8888
project: my-project89-
version: 0.1.489+
version: 0.1.59090
9191
9292
repositories:@@ -159,7 +159,7 @@
159159
helmwave [global options] command [command options] [arguments...]160160
161161
VERSION:162-
0.1.4162+
0.1.5163163
164164
DESCRIPTION:165165
🏖 This tool helps you compose your helm releases!@@ -192,7 +192,7 @@
192192
193193
```yaml194194
project: {{ env "CI_PROJECT_NAME" }}195-
version: 0.1.4195+
version: 0.1.5196196
197197
198198
repositories:@@ -224,7 +224,7 @@
224224
225225
```yaml226226
project: my-project227-
version: 0.1.4227+
version: 0.1.5228228
229229
230230
repositories:@@ -255,7 +255,7 @@
255255
256256
```yaml257257
project: my-project258-
version: 0.1.4258+
version: 0.1.5259259
repositories:260260
- name: bitnami261261
url: https://charts.bitnami.com/bitnami@@ -348,12 +348,90 @@
348348
Helmwave supports all built-in functions, [Sprig library](https://godoc.org/github.com/Masterminds/sprig), and several advanced functions:349349
- `toYaml` marshals a map into a string350350
- `fromYaml` reads a golang string and generates a map351+
- `readFile` get file as string351352
- `get` (Sprig's original `get` is available as `sprigGet`)352353
- `setValueAtPath` PATH NEW_VALUE traverses a golang map, replaces the value at the PATH with NEW_VALUE353354
- `requiredEnv` The requiredEnv function allows you to declare a particular environment variable as required for template rendering. If the environment variable is unset or empty, the template rendering will fail with an error message.354355
355356
I am working for added more functions. 356357
358+
#### readFile359+
360+
<details>361+
<summary>my-releases.yml</summary>362+
363+
```yaml364+
releases:365+
- name: redis366+
repo: bitnami367+
- name: memcached368+
repo: bitnami369+
```370+
</details>371+
372+
<details>373+
<summary>helmwave.yml.tpl</summary>374+
375+
```yaml376+
project: my377+
version: 0.1.5378+
379+
380+
repositories:381+
- name: bitnami382+
url: https://charts.bitnami.com/bitnami383+
384+
385+
.global: &global386+
install: true387+
388+
389+
releases:390+
{{- with readFile "my-releases.yml" | fromYaml | get "releases" }}391+
{{- range $v := . }}392+
- name: {{ $v | get "name" }}393+
chart: {{ $v | get "repo" }}/{{ $v | get "name" }}394+
options:395+
<<: *global396+
{{- end }}397+
{{- end }}398+
``` 399+
400+
</details>401+
402+
```bash403+
$ helmwave render404+
```405+
406+
<details>407+
<summary>helmwave.yml</summary>408+
409+
```yaml410+
project: my411+
version: 0.1.5412+
413+
repositories:414+
- name: bitnami415+
url: https://charts.bitnami.com/bitnami416+
417+
.global: &global418+
install: true419+
420+
releases:421+
- name: redis422+
chart: bitnami/redis423+
options:424+
<<: *global425+
- name: memcached426+
chart: bitnami/memcached427+
options:428+
<<: *global429+
``` 430+
431+
</details>432+
433+
434+
357435
## 🚀 Features358436
359437
- [x] Helm release is working via official golang module [helm](https://github.com/helm/helm/tree/master/pkg)my-releases.ymladdedView file
Loading diff…
pkg/cli/new.gomodifiedView file
Loading diff…
pkg/template/extra.gomodifiedView file
Loading diff…
pkg/template/func.gomodifiedView file
Loading diff…