Skip to content

Commit 56c1a4a

Browse files
linkilachie83
authored andcommitted
chaoskube: add chaoskube helm chart (helm#327)
* feat(chaoskube): add chaoskube helm chart * feat(chaoskube): make dry run mode the default * fix(chaoskube): change the wording explaining dryRun * fix(chaoskube): better explain how to disable dryRun * fix(chaoskube): remove useless empty line * chore(chaoskube): move chaoskube to stable * fix(chaoskube): update docs to reflect move to stable * docs(chaoskube): explain what helm install does
1 parent 23ed382 commit 56c1a4a

File tree

5 files changed

+125
-0
lines changed

5 files changed

+125
-0
lines changed

stable/chaoskube/Chart.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: chaoskube
2+
version: 0.3.1
3+
description: A Helm chart for chaoskube
4+
home: https://github.com/linki/chaoskube
5+
sources:
6+
- https://github.com/linki/chaoskube
7+
maintainers:
8+
- name: Martin Linkhorst
9+
email: linki+helm.sh@posteo.de
10+
engine: gotpl

stable/chaoskube/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Chaoskube Helm Chart
2+
3+
[chaoskube](https://github.com/linki/chaoskube) periodically kills random pods in your Kubernetes cluster.
4+
5+
## TL;DR;
6+
7+
```console
8+
$ helm install stable/chaoskube
9+
```
10+
11+
## Installing the Chart
12+
13+
To install the chart with the release name `my-release`:
14+
15+
```console
16+
$ helm install --name my-release stable/chaoskube
17+
```
18+
19+
The command deploys chaoskube on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
20+
21+
## Uninstalling the Chart
22+
23+
To uninstall/delete the my-release deployment:
24+
25+
```console
26+
$ helm delete my-release
27+
```
28+
29+
The command removes all the Kubernetes components associated with the chart and deletes the release.
30+
31+
## Configuration
32+
33+
By default `chaoskube` runs in dry-run mode so it doesn't actually kill anything.
34+
If you're sure you want to use it run `helm` with:
35+
36+
```console
37+
$ helm install stable/chaoskube --set dryRun=false
38+
```
39+
40+
| Parameter | Description | Default |
41+
|---------------------------|-----------------------------------------------------|-----------------------------------|
42+
| `name` | container name | chaoskube |
43+
| `image` | docker image | quay.io/linki/chaoskube |
44+
| `imageTag` | docker image tag | v0.3.1 |
45+
| `replicas` | number of replicas to run | 1 |
46+
| `interval` | interval between pod terminations | 10m |
47+
| `dryRun` | don't kill pods, only log what would have been done | true |
48+
| `resources.cpu` | cpu resource requests and limits | 10m |
49+
| `resources.memory` | memory resource requests and limits | 16Mi |
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
chaoskube is running and will kill arbitrary pods every {{ .Values.interval }}.
2+
3+
You can follow the logs to see what chaoskube does:
4+
5+
POD=$(kubectl get pods -l app={{ printf "%s-%s" .Release.Name .Values.name }} --namespace {{ .Release.Namespace }} --output name)
6+
kubectl logs -f $POD --namespace={{ .Release.Namespace }}
7+
{{ if .Values.dryRun }}
8+
You are running in dry-run mode. No pod is actually terminated.
9+
{{ end -}}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Deployment
3+
metadata:
4+
name: {{ printf "%s-%s" .Release.Name .Values.name }}
5+
labels:
6+
app: {{ printf "%s-%s" .Release.Name .Values.name }}
7+
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8+
release: {{ .Release.Name }}
9+
heritage: {{ .Release.Service }}
10+
spec:
11+
replicas: {{ .Values.replicas }}
12+
template:
13+
metadata:
14+
labels:
15+
app: {{ printf "%s-%s" .Release.Name .Values.name }}
16+
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
17+
release: {{ .Release.Name }}
18+
heritage: {{ .Release.Service }}
19+
spec:
20+
containers:
21+
- name: {{ .Values.name }}
22+
image: {{ .Values.image }}:{{ .Values.imageTag }}
23+
args:
24+
- --in-cluster
25+
- --interval={{ .Values.interval }}
26+
{{- if not .Values.dryRun}}
27+
- --no-dry-run
28+
{{- end }}
29+
resources:
30+
requests:
31+
cpu: {{ .Values.resources.cpu }}
32+
memory: {{ .Values.resources.memory }}
33+
limits:
34+
cpu: {{ .Values.resources.cpu }}
35+
memory: {{ .Values.resources.memory }}

stable/chaoskube/values.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# container name
2+
name: chaoskube
3+
4+
# docker image
5+
image: quay.io/linki/chaoskube
6+
7+
# docker image tag
8+
imageTag: v0.3.1
9+
10+
# number of replicas to run
11+
replicas: 1
12+
13+
# interval between pod terminations
14+
interval: 10m
15+
16+
# don't kill pods, only log what would have been done
17+
dryRun: true
18+
19+
# resource requests and limits
20+
resources:
21+
cpu: 10m
22+
memory: 16Mi

0 commit comments

Comments
 (0)