Skip to content

Commit 2954b2f

Browse files
committed
add first step
1 parent e81dcbe commit 2954b2f

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed

stable/helm/NOTES.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Kubernetes Configuration
2+
3+
Currently, you need to pass a Kubernetes configuration file as a single line string, using `KUBE_CONFIG` environment variable. Please, make sure to use a valid [Kubernetes configuration file](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) with at least one context and `current-context` set to one you want to use.
4+
5+
Use following command to generate single line, base 64 encoded string:
6+
7+
```sh
8+
$ KUBE_CONFIG=$(cat ~/.kube/my_cluster_config | base64 -e | tr -d '\r\n')
9+
```

stable/helm/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Codefresh Helm Plugin
2+
3+
Use Codefresh [Helm](https://helm.sh) plugin to deploy a Helm chart into specified (by context) Kubernetes cluster.
4+
5+
## Usage
6+
7+
Set required and optional environment variable and add the following step to your Codefresh pipeline:
8+
9+
```yaml
10+
---
11+
version: '1.0'
12+
13+
steps:
14+
15+
...
16+
17+
release_to_env:
18+
image: codefresh/plugin-helm
19+
20+
...
21+
22+
```
23+
24+
## Environment Variables
25+
26+
- **required** `CHART_NAME` - Helm chart name
27+
- **required** `RELEASE_NAME` - Helm release name
28+
- **required** `KUBE_CONFIG` - Kubernetes configuration file (single line base64 encoded string)
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)
36+

stable/helm/plugin.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
image: codefresh/plugin-helm
2+
tag: master
3+
version: 1.0.0
4+
description: Release a Helm chart (update or install)
5+
keywords:
6+
- helm
7+
- kubernetes
8+
home: https://github.com/codefresh-io/cf-plugin-helm
9+
sources:
10+
- https://github.com/codefresh-io/cf-plugin-helm
11+
maintainers: # (optional)
12+
- name: Alexei Ledenev
13+
email: alexei@codefresh.io
14+
icon: A URL to an SVG or PNG image to be used as an icon (optional)
15+
envs:
16+
- name: CHART_NAME
17+
type: required
18+
description: Helm chart name to release
19+
- name: RELEASE_NAME
20+
type: required
21+
description: Helm release name
22+
- name: NAMESPACE
23+
description: target Kubernetes namespace
24+
- name: CHART_VERSION
25+
description: application chart version to install
26+
- name: CHART_REPO_URL
27+
description: Helm chart repository URL
28+
- name: DRY_RUN
29+
description: do a "dry run" installation (do not install anything, useful for Debug)
30+
- name: DEBUG
31+
description: print verbose install output
32+
- name: WAIT
33+
description: block step execution till installation completed and all Kubernetes resources are ready
34+
- name: TIMEOUT
35+
description: wait timeout (5min by default)
36+
volumes:
37+
- name: /root/.kube/config
38+
required: true
39+
description: Kubernetes configuration file (**TODO** need to be implemented)

0 commit comments

Comments
 (0)