Skip to content

Commit a3648fc

Browse files
need to update readme here to match plugin readme
1 parent 105835a commit a3648fc

File tree

1 file changed

+48
-20
lines changed

1 file changed

+48
-20
lines changed

stable/helm/README.md

Lines changed: 48 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ Use Codefresh [Helm](https://helm.sh) plugin to deploy a Helm chart into specifi
66

77
Set required and optional environment variable and add the following step to your Codefresh pipeline:
88

9+
Example Variables:
10+
11+
The example below will run `helm upgrade` using Helm chart with the name `mychart` located in `https://helmrepo.codefresh.io/codefresh/helm` Helm chart repository using the `myrelease` Helm release name against `mycluster` Kubernetes cluster in the `mynamespace` Kubernetes Namespace.
12+
13+
```text
14+
CHART_NAME=mychart
15+
RELEASE_NAME=myrelease
16+
KUBE_CONTEXT=mycluster
17+
NAMESPACE=mynamespace
18+
CHART_REPO_URL=https://helmrepo.codefresh.io/codefresh/helm
19+
```
20+
921
```yaml
1022
---
1123
version: '1.0'
@@ -14,44 +26,60 @@ steps:
1426

1527
...
1628

17-
release_to_env:
18-
image: codefresh/plugin-helm:2.7.2
29+
Helm Upgrade:
30+
title: Helm Upgrade
31+
image: 'codefresh/plugin-helm:2.8.0'
32+
environment:
33+
- CHART_NAME=${{CHART_NAME}}
34+
- RELEASE_NAME=${{RELEASE_NAME}}
35+
- KUBE_CONTEXT=${{KUBE_CONTEXT}}
36+
- NAMESPACE=${{NAMESPACE}}
37+
- DEBUG_CHART=${{DEBUG_CHART}}
38+
- CHART_REPO_URL=${{CHART_REPO_URL}}
1939

2040
...
2141

2242
```
2343

2444
## Environment Variables
2545

26-
- **required** `CHART_NAME` - Helm chart name
27-
- **required** `RELEASE_NAME` - Helm release name
28-
- **required** `KUBE_CONTEXT` - Kubernetes context to use
29-
- `NAMESPACE` - target Kubernetes namespace
30-
- `CHART_VERSION` - application chart version to install
31-
- `CHART_REPO_URL` - Helm chart repository URL
32-
- `DRY_RUN` - do a "dry run" installation (do not install anything, useful for Debug)
33-
- `DEBUG` - print verbose install output
34-
- `WAIT` - block step execution till installation completed and all Kubernetes resources are ready
35-
- `TIMEOUT` - wait timeout (5min by default)
46+
| Variables | Required | Default | Description |
47+
|----------------|----------|---------|-----------------------------------------------------------------------------------------|
48+
| CHART_NAME | YES | | Helm chart name |
49+
| RELEASE_NAME | YES | | Helm release name |
50+
| KUBE_CONTEXT | YES | | Kubernetes context to use (Custom Cluster Name in Codefresh) |
51+
| NAMESPACE | NO | | Target Kubernetes namespace |
52+
| CHART_VERSION | NO | | Helm chart version to install |
53+
| CHART_REPO_URL | NO | | Helm chart repository URL (Required unless code repository contains Helm chart) |
54+
| DRY_RUN | NO | | Do a "dry run" installation (do not install anything, useful for Debug) |
55+
| DEBUG | NO | | Print verbose install output |
56+
| WAIT | NO | | Block step execution till installation completed and all Kubernetes resources are ready |
57+
| TIMEOUT | NO | 5 Min | Wait Timeout |
3658

3759
### Overriding Helm Variables
3860

3961
Codefresh Helm plugin supports overriding Helm variables.
4062

41-
#### Naming Guide
42-
43-
Prefix environment variable with `custom_` (or `CUSTOM_`) and replace any `.` character with `_`.
63+
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.
64+
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.
4465

66+
Examples:
4567
```text
46-
# set ENV variable in Codefresh UI
47-
custom_myimage_pullPolicy=Always
68+
CUSTOM_myimage_pullPolicy=Always
4869
# Codefresh Helm plugin will add option below to the 'helm update --install' command
4970
--set myimage.pullPolicy=Always
5071
51-
# Another example
52-
CUSTOM_redis_resources_requests_memory=256Mi
72+
CUSTOMFILE_prod='values-prod.yaml'
73+
# Codefresh Helm plugin will add option below to the 'helm update --install' command
74+
--values values-prod.yaml
75+
```
76+
77+
If a variable contains a `_`, replace the `_` character with `__`.
78+
79+
```text
80+
custom_env_open_STORAGE__AMAZON__BUCKET=my-s3-bucket
5381
# translates to ...
54-
--set redis.resources.requests.memory=256Mi
82+
--set env.open.STORAGE_AMAZON_BUCKET=my-s3-bucket
5583
```
5684

5785
## Kubernetes Configuration

0 commit comments

Comments
 (0)