|
1 |
| -# Codefresh Helm Plugin |
2 |
| - |
3 |
| -You can always use the `helm` command line in a freestyle step, like any other command line tool, but for Helm, You might want to check out out helm deployment step. |
4 |
| - |
5 |
| -## Usage |
6 |
| - |
7 |
| -Set required and optional environment variable and add the following step to your Codefresh pipeline like so: |
8 |
| - |
9 |
| -```yaml |
10 |
| -Helm Upgrade: |
11 |
| - image: 'codefresh/cfstep-helm:2.8.0' |
12 |
| -``` |
13 |
| -
|
14 |
| -## Environment Variables |
15 |
| -
|
16 |
| -Name|Required|Description |
17 |
| ----|---|--- |
18 |
| -KUBE_CONTEXT|required|Kubernetes context to use (the name of the cluster as configured in Codefresh) |
19 |
| -CHART_NAME|required|Helm chart name to release (path to chart folder, or name of packaged chart) |
20 |
| -RELEASE_NAME|required|Helm release name |
21 |
| -NAMESPACE|required|target Kubernetes namespace |
22 |
| -TILLER_NAMESPACE|required|Kubernetes namespace where tiller is at |
23 |
| -CHART_VERSION|required|application chart version to install |
24 |
| -CHART_REPO_URL|required|Helm chart repository URL (overriden by injected Helm repository context) |
25 |
| -CUSTOMFILE_|optional|Values file to provide to Helm (as --file). see usage information below. |
26 |
| -CUSTOM_|optional|Value to provide to Helm (as --set). see usage information below. |
27 |
| -CMD_PS|optional|Command Postscript - this will be appended to the command string. Can be used to set additional parameters supported by the command but not exposed as variables. |
28 |
| -
|
29 |
| -## Helm Values |
30 |
| -
|
31 |
| -To supply value file, add an environment variable with the name prefix of `CUSTOMFILE_` (case *in*sensitive), and the value should point to an existing values file. |
32 |
| -To override specific values, add an environment variable with the name prefix of `CUSTOM_` (case *in*sensitive), and replace any `.` characters in the name with `_`. The value should be the value for the variable. |
33 |
| - |
34 |
| -Examples: |
35 |
| -```text |
36 |
| -CUSTOM_myimage_pullPolicy=Always |
37 |
| -# Codefresh Helm plugin will add option below to the 'helm update --install' command |
38 |
| ---set myimage.pullPolicy=Always |
39 |
| -
|
40 |
| -CUSTOMFILE_prod='values-prod.yaml' |
41 |
| -# Codefresh Helm plugin will add option below to the 'helm update --install' command |
42 |
| ---values values-prod.yaml |
43 |
| -``` |
44 |
| - |
45 |
| -If a variable contains a `_`, replace the `_` character with `__`. |
46 |
| - |
47 |
| -```text |
48 |
| -custom_env_open_SOME__VAR__REF=myvalue |
49 |
| -# translates to ... |
50 |
| ---set env.open.SOME_VAR_REF=myvalue |
51 |
| -``` |
52 |
| - |
53 |
| -## Kubernetes Configuration |
54 |
| - |
55 |
| -Add Kubernetes integration to Codefresh: `> Account Settings > Integration > Kubernetes`. From now on, you can use added Kubernetes cluster in Codefresh pipeline, addressing its context by the name you see in `Clusters` menu. |
56 |
| - |
57 |
| -## Helm Reposiroty Configuration |
58 |
| - |
59 |
| -To install a chart from a private repository, add your repository in Codefresh, and inject it into the pipeline by selecting it under "Environment Variables" -> "Import from shared configuration". |
60 |
| -Then you can simple select the chart with the `CHART_NAME` variable. No additional configuration needed. |
| 1 | +See documentation here: [https://codefresh.io/docs/docs/new-helm/using-helm-in-codefresh-pipeline/](https://codefresh.io/docs/docs/new-helm/using-helm-in-codefresh-pipeline/) |
0 commit comments