Improve cassandra deployment (#199)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2018-02-21 09:45:27 -08:00 committed by Ahmet Alp Balkan
parent b8bf4f4e9a
commit 2845293915
1 changed files with 6 additions and 4 deletions

View File

@ -15,9 +15,10 @@ spec:
labels:
app: cassandra
spec:
terminationGracePeriodSeconds: 1800
containers:
- name: cassandra
image: gcr.io/google-samples/cassandra:v12
image: gcr.io/google-samples/cassandra:v13
imagePullPolicy: Always
ports:
- containerPort: 7000
@ -42,7 +43,10 @@ spec:
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done"]
command:
- /bin/sh
- -c
- nodetool drain
env:
- name: MAX_HEAP_SIZE
value: 512M
@ -56,8 +60,6 @@ spec:
value: "DC1-K8Demo"
- name: CASSANDRA_RACK
value: "Rack1-K8Demo"
- name: CASSANDRA_AUTO_BOOTSTRAP
value: "false"
- name: POD_IP
valueFrom:
fieldRef: