You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Relative Paths in Helmfile w/ --values overrides**
44
46
45
-
This is an example of a Helmfile manifest using relative paths for values including an additional `--values` from the command line.
47
+
This is an example of a Helmfile manifest using relative paths for values including an additional `--values` from the command line.
46
48
47
49
NOTE: The `--values` is resolved relative to the CWD of the terminal *not* the Helmfile manifest. You can see this with the `replicas` being adjusted to 3 now for the deployment.
Copy file name to clipboardexpand all lines: README.md
+38-34
Original file line number
Diff line number
Diff line change
@@ -351,15 +351,15 @@ releases:
351
351
352
352
If you wish to treat your enviroment variables as strings always, even if they are boolean or numeric values you can use `{{ env "ENV_NAME" | quote }}` or `"{{ env "ENV_NAME" }}"`. These approaches also work with `requiredEnv`.
353
353
354
-
## installation
354
+
## Installation
355
355
356
356
- download one of [releases](https://github.com/roboll/helmfile/releases) or
357
357
- run as a [container](https://quay.io/roboll/helmfile) or
358
358
- install from [AUR](https://aur.archlinux.org/packages/kubernetes-helmfile-bin/) for Archlinux or
359
359
- Windows (using [scoop](https://scoop.sh/)): `scoop install helmfile`
Let's start with a simple `helmfile` and gradually improve it to fit your use-case!
365
365
@@ -389,7 +389,7 @@ Iterate on the `helmfile.yaml` by referencing:
389
389
- [CLI reference](#cli-reference).
390
390
- [Helmfile Best Practices Guide](https://github.com/roboll/helmfile/blob/master/docs/writing-helmfile.md)
391
391
392
-
## cli reference
392
+
## CLI Reference
393
393
394
394
```
395
395
NAME:
@@ -496,7 +496,6 @@ The `helmfile delete` sub-command deletes all the releases defined in the manife
496
496
497
497
Note that `delete` doesn't purge releases. So `helmfile delete && helmfile sync` results in sync failed due to that releases names are not deleted but preserved for future references. If you really want to remove releases for reuse, add `--purge` flag to run it like `helmfile delete --purge`.
498
498
499
-
500
499
### secrets
501
500
502
501
The `secrets` parameter in a `helmfile.yaml` causes the [helm-secrets](https://github.com/futuresimple/helm-secrets) plugin to be executed to decrypt the file.
@@ -516,6 +515,7 @@ Use `--cleanup` to delete pods upon completion.
516
515
The `helmfile lint` sub-command runs a `helm lint` across all of the charts/releases defined in the manifest. Non local charts will be fetched into a temporary folder which will be deleted once the task is completed.
517
516
518
517
## Paths Overview
518
+
519
519
Using manifest files in conjunction with command line argument can be a bit confusing.
520
520
521
521
A few rules to clear up this ambiguity:
@@ -524,9 +524,10 @@ A few rules to clear up this ambiguity:
524
524
- Relative paths referenced *in* the Helmfile manifest itself are relative to that manifest
525
525
- Relative paths referenced on the command line are relative to the current working directory the user is in
526
526
527
-
For additional context, take a look at [paths examples](PATHS.md)
527
+
For additional context, take a look at [paths examples](PATHS.md).
528
528
529
529
## Labels Overview
530
+
530
531
A selector can be used to only target a subset of releases when running Helmfile. This is useful for large helmfiles with releases that are logically grouped together.
531
532
532
533
Labels are simple key value pairs that are an optional field of the release spec. When selecting by label, the search can be inverted. `tier!=backend` would match all releases that do NOT have the `tier: backend` label. `tier=fronted` would only match releases with the `tier: frontend` label.
@@ -535,7 +536,7 @@ Multiple labels can be specified using `,` as a separator. A release must match
535
536
536
537
The `selector` parameter can be specified multiple times. Each parameter is resolved independently so a release that matches any parameter will be used.
537
538
538
-
`--selector tier=frontend --selector tier=backend` will select all the charts
539
+
`--selector tier=frontend --selector tier=backend` will select all the charts.
539
540
540
541
In addition to user supplied labels, the name, the namespace, and the chart are available to be used as selectors. The chart will just be the chart name excluding the repository (Example `stable/filebeat` would be selected using `--selector chart=filebeat`).
541
542
@@ -544,7 +545,7 @@ For instance, you install a number of charts on every customer but need to provi
544
545
545
546
templates/common.yaml:
546
547
547
-
```
548
+
```yaml
548
549
templates:
549
550
nginx: &nginx
550
551
name: nginx
@@ -563,7 +564,7 @@ templates:
563
564
564
565
helmfile.yaml:
565
566
566
-
```
567
+
```yaml
567
568
{{ readFile "templates/common.yaml" }}
568
569
569
570
commonLabels:
@@ -984,14 +985,14 @@ that is accessible by running a command:
@@ -1037,7 +1038,7 @@ This is the counterpart to `prepare`, as any release on which `prepare` has been
1037
1038
1038
1039
The following is an example hook that just prints the contextual information provided to hook:
1039
1040
1040
-
```
1041
+
```yaml
1041
1042
releases:
1042
1043
- name: myapp
1043
1044
chart: mychart
@@ -1072,10 +1073,11 @@ For templating, imagine that you created a hook that generates a helm chart on-t
1072
1073
It will allow you to write your helm releases with any language you like, while still leveraging goodies provided by helm.
1073
1074
1074
1075
### Global Hooks
1076
+
1075
1077
In contrast to the per release hooks mentioned above these are run only once at the very beginning and end of the execution of a helmfile command and only the `prepare` and `cleanup` hooks are available respectively.
1076
1078
1077
1079
They use the same syntax as per release hooks, but at the top level of your helmfile:
1078
-
```yaml
1080
+
```yaml
1079
1081
hooks:
1080
1082
- events: ["prepare", "cleanup"]
1081
1083
showlogs: true
@@ -1146,17 +1148,17 @@ We also have dedicated documentation on the following topics which might interes
1146
1148
1147
1149
Or join our friendly slack community in the [`#helmfile`](https://slack.sweetops.com) channel to ask questions and get help. Check out our [slack archive](https://archive.sweetops.com/helmfile/) for good examples of how others are using it.
1148
1150
1149
-
## Using env files
1151
+
## Using .env files
1150
1152
1151
-
Helmfile itself doesn't have an ability to load env files. But you can write some bash script to achieve the goal:
1153
+
Helmfile itself doesn't have an ability to load .env files. But you can write some bash script to achieve the goal:
1152
1154
1153
1155
```console
1154
1156
set -a; . .env; set +a; helmfile sync
1155
1157
```
1156
1158
1157
1159
Please see #203 for more context.
1158
1160
1159
-
## Running helmfile interactively
1161
+
## Running Helmfile interactively
1160
1162
1161
1163
`helmfile --interactive [apply|destroy]` requests confirmation from you before actually modifying your cluster.
1162
1164
@@ -1170,29 +1172,14 @@ Once you download all required charts into your machine, you can run `helmfile c
1170
1172
It basically run only `helm upgrade --install` with your already-downloaded charts, hence no Internet connection is required.
1171
1173
See #155 for more information on this topic.
1172
1174
1173
-
## Experimental features
1175
+
## Experimental Features
1176
+
1174
1177
Some experimental features may be available for testing in perspective of being (or not) included in a future release.
1175
1178
Those features are set using the environment variable `HELMFILE_EXPERIMENTAL`. Here is the current experimental feature :
1176
1179
*`explicit-selector-inheritance` : remove today implicit cli selectors inheritance for composed helmfiles, see [composition selector](#selectors)
1177
1180
1178
1181
If you want to enable all experimental features set the env var to `HELMFILE_EXPERIMENTAL=true`
1179
1182
1180
-
## Azure ACR integration
1181
-
1182
-
Azure offers helm repository [support for Azure Container Registry](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-helm-repos) as a preview feature.
1183
-
1184
-
To use this you must first `az login` and then `az acr helm repo add -n <MyRegistry>`. This will extract a token for the given ACR and configure `helm` to use it, e.g. `helm repo update` should work straight away.
1185
-
1186
-
To use `helmfile` with ACR, on the other hand, you must either include a username/password in the repository definition for the ACR in your `helmfile.yaml` or use the `--skip-deps` switch, e.g. `helmfile template --skip-deps`.
1187
-
1188
-
An ACR repository definition in `helmfile.yaml` looks like this:
1189
-
1190
-
```
1191
-
repositories:
1192
-
- name: <MyRegistry>
1193
-
url: https://<MyRegistry>.azurecr.io/helm/v1/repo
1194
-
```
1195
-
1196
1183
## Examples
1197
1184
1198
1185
For more examples, see the [examples/README.md](https://github.com/roboll/helmfile/blob/master/examples/README.md) or the [`helmfile`](https://github.com/cloudposse/helmfiles/tree/master/releases) distribution by [Cloud Posse](https://github.com/cloudposse/).
@@ -1202,6 +1189,7 @@ For more examples, see the [examples/README.md](https://github.com/roboll/helmfi
1202
1189
-[renovate](https://github.com/renovatebot/renovate) automates chart version updates. See [this PR for more information](https://github.com/renovatebot/renovate/pull/5257).
1203
1190
- For updating container image tags and git tags embedded within helmfile.yaml and values, you can use [renovate's regexManager](https://docs.renovatebot.com/modules/manager/regex/). Please see [this comment in the renovate repository](https://github.com/renovatebot/renovate/issues/6130#issuecomment-624061289) for more information.
1204
1191
-[ArgoCD Integration](#argocd-integration)
1192
+
-[Azure ACR Integration](#azure-acr-integration)
1205
1193
1206
1194
### ArgoCD Integration
1207
1195
@@ -1235,7 +1223,7 @@ git push origin $BRANCH
1235
1223
1236
1224
> Note that `$(pwd)` is necessary when `hemlfile.yaml` has one or more sub-helmfiles in nested directories,
1237
1225
> because setting a relative file path in `--output-dir` or `--output-dir-template` results in each sub-helmfile render
1238
-
> to the directory relative to the specified path.
1226
+
> to the directory relative to the specified path.
1239
1227
1240
1228
so that they can be deployed by Argo CD as usual.
1241
1229
@@ -1252,7 +1240,23 @@ Recommendations:
1252
1240
- If you don't directly push it to the main Git branch and instead go through a pull-request, do lint rendered manifests on your CI, so that you can catch easy mistakes earlier/before ArgoCD finally deploys it
1253
1241
- See [this ArgoCD issue](https://github.com/argoproj/argo-cd/issues/2143#issuecomment-570478329) for why you may want this, and see [this helmfile issue](https://github.com/roboll/helmfile/pull/1357) for how `--output-dir-template` works.
1254
1242
1255
-
# Attribution
1243
+
### Azure ACR Integration
1244
+
1245
+
Azure offers helm repository [support for Azure Container Registry](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-helm-repos) as a preview feature.
1246
+
1247
+
To use this you must first `az login` and then `az acr helm repo add -n <MyRegistry>`. This will extract a token for the given ACR and configure `helm` to use it, e.g. `helm repo update` should work straight away.
1248
+
1249
+
To use `helmfile` with ACR, on the other hand, you must either include a username/password in the repository definition for the ACR in your `helmfile.yaml` or use the `--skip-deps` switch, e.g. `helmfile template --skip-deps`.
1250
+
1251
+
An ACR repository definition in `helmfile.yaml` looks like this:
0 commit comments