Skip to content
Permalink
Browse files

app.yaml to contain drain controller template: https://github.com/luk…

  • Loading branch information...
ochaloup committed Jul 23, 2018
1 parent 9859887 commit 06227df795745b23f8d1cf7cde227f0404ee66c2
Showing with 32 additions and 2 deletions.
  1. +32 −2 app.yaml
@@ -3,6 +3,37 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mehdb
annotations:
statefulsets.kubernetes.io/drainer-pod-template: |
{
"metadata": {
"labels": {
"app": "mehdb-drainer"
}
},
"spec": {
"terminationGracePeriodSeconds": 5,
"containers": [
{
"name": "main",
"image": "busybox",
"env": [
{
"name": "MEHDB_DATADIR",
"value": "/mehdbdata"
}
],
"command": ["/bin/sh", "-c", "echo \"Datadir '$MEHDB_DATADIR' content now: \" ; find $MEHDB_DATADIR ; echo \"Draining data... this takes 10 seconds!\" ; sleep 10 ; rm -rf $MEHDB_DATADIR/* ; find $MEHDB_DATADIR"],
"volumeMounts": [
{
"name": "data",
"mountPath": "/mehdbdata"
}
]
}
]
}
}
spec:
selector:
matchLabels:
@@ -42,7 +73,6 @@ spec:
name: data
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "ebs"
resources:
requests:
storage: 1Gi
@@ -58,4 +88,4 @@ spec:
- port: 9876
clusterIP: None
selector:
app: mehdb
app: mehdb

0 comments on commit 06227df

Please sign in to comment.
You can’t perform that action at this time.