Skip to content

Commit

Permalink
Merge pull request kubernetes#49618 from pavolloffay/cassandra-preSto…
Browse files Browse the repository at this point in the history
…p-drain

Automatic merge from submit-queue (batch tested with PRs 47724, 49984, 49785, 49803, 49618)

Cassandra example, use nodetool drain in preStop

Related to kubernetes#39199 (comment)
  • Loading branch information
Kubernetes Submit Queue authored Aug 12, 2017
2 parents b354c6f + b45f286 commit bb67819
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/storage/cassandra/cassandra-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ spec:
labels:
app: cassandra
spec:
terminationGracePeriodSeconds: 1800
containers:
- name: cassandra
image: gcr.io/google-samples/cassandra:v12
Expand Down Expand Up @@ -37,7 +38,7 @@ 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
Expand Down

0 comments on commit bb67819

Please sign in to comment.