Skip to content

Commit f64bf9a

Browse files
authored
Merge pull request codefresh-io#10 from alexei-led/master
add Kompose plugin
2 parents 42a1e96 + 0770cf6 commit f64bf9a

File tree

3 files changed

+80
-1
lines changed

3 files changed

+80
-1
lines changed

incubator/kompose/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Codefresh Kompose Plugin
2+
3+
Use Codefresh [Kompose](http://kompose.io) plugin to deploy or convert a Docker Compose file into Kubernetes resources.
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-kompose:v1.5.0
19+
20+
...
21+
22+
```
23+
24+
## Environment Variables
25+
26+
- **required** `KUBE_CONTEXT` - Kubernetes context to use
27+
- `FILE` - Docker Compose file to deploy (default `docker-compose.yaml` file)
28+
- `NAMESPACE` - target Kubernetes namespace (default `default` namespace)
29+
- `REPLICAS` - specify the number of replicas generated (default `1`)
30+
- `VOLUMES` - volumes to be generated (`persistentVolumeClaim`|`emptyDir`) (default `persistentVolumeClaim`)
31+
- `DRY_RUN` - do a "dry run" (print out) deployment (do not install anything, useful for Debug)
32+
- `DEBUG` - print verbose install output
33+
34+
35+
## Kubernetes Configuration
36+
37+
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.
38+
39+
## Building Plugin
40+
41+
Use `docker build` command to build the plugin.
42+
Two build arguments can be provided to override default `kubectl`, `helm` and `kompose` version:
43+
44+
- `HELM_VERSION` - default to `latest`
45+
- `KOMPOSE_VERSION` - default to `v1.5.0`

incubator/kompose/plugin.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
image: codefresh/plugin-helm
2+
tag: v1.5.0
3+
version: 1.0.0
4+
description: Release a Docker Compose to Kubernetes
5+
keywords:
6+
- docker-compose
7+
- docker
8+
- kompose
9+
- kubernetes
10+
home: https://github.com/codefresh-io/cf-kompose-plugin
11+
sources:
12+
- https://github.com/codefresh-io/cf-kompose-plugin
13+
maintainers: # (optional)
14+
- name: Alexei Ledenev
15+
16+
icon: http://cdn.rancher.com/wp-content/uploads/2016/04/20182217/compose-300x295.png
17+
envs:
18+
- name: KUBE_CONTEXT
19+
type: required
20+
description: Kubernetes context to use
21+
- name: FILE
22+
description: Docker Compose file to deploy (default "docker-compose.yaml` file)
23+
- name: NAMESPACE
24+
description: target Kubernetes namespace (default "default")
25+
- name: VOLUMES
26+
description: volumes to be generated ("persistentVolumeClaim"|"emptyDir") (default "persistentVolumeClaim")
27+
- name: REPLICAS
28+
description: specify the number of replicas generated (default 1)
29+
- name: DRY_RUN
30+
description: do a "dry run" (print out) deployment (do not install anything, useful for Debug)
31+
- name: DEBUG
32+
description: print verbose install output
33+
context:
34+
- kind: kubernetes

stable/helm/plugin.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ maintainers: # (optional)
1313
1414
icon: https://avatars0.githubusercontent.com/u/29493517?v=4&s=400
1515
envs:
16-
- name: KUBE_CONTEXT
16+
- name: KUBE_CONTEXT
1717
type: required
1818
description: Kubernetes context to use
1919
- name: CHART_NAME

0 commit comments

Comments
 (0)