Cassandra example, use nodetool drain in preStop

This commit is contained in:
Pavol Loffay 2017-07-26 12:53:27 +02:00
parent 744455c69d
commit 82241e4c0d

View File

@ -37,7 +37,7 @@ spec:
lifecycle: lifecycle:
preStop: preStop:
exec: 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: env:
- name: MAX_HEAP_SIZE - name: MAX_HEAP_SIZE
value: 512M value: 512M