Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #26 from sroze/kube-configuration
Browse files Browse the repository at this point in the history
Add deployment example as a Kubernetes DaemonSet
  • Loading branch information
mikljohansson committed May 31, 2016
2 parents 2bcba27 + b3c4a5d commit 572cfa6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ docker run \
meltwater/docker-cleanup:latest
```

### Kubernetes

You can find a Kubernetes `DaemonSet` configuration, that will allow you to run the `meltwater/docker-cleanup` container on every node of your cluster.

```
kubectl create -f contrib/k8s-daemonset.yml
```

### Development

A ``Makefile`` is included to help with repetitive commands during development.
Expand Down
36 changes: 36 additions & 0 deletions contrib/k8s-daemonset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
name: clean-up
name: clean-up
spec:
template:
metadata:
labels:
app: clean-up
spec:
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker.sock
- name: docker-directory
hostPath:
path: /var/lib/docker

containers:
- image: meltwater/docker-cleanup:latest
name: clean-up
env:
- name: CLEAN_PERIOD
value: "60"
- name: DELAY_TIME
value: "1800"
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-sock
readOnly: false
- mountPath: /var/lib/docker
name: docker-directory
readOnly: false

0 comments on commit 572cfa6

Please sign in to comment.