mirror of https://github.com/k3s-io/k3s
Merge pull request #49618 from pavolloffay/cassandra-preStop-drain
Automatic merge from submit-queue (batch tested with PRs 47724, 49984, 49785, 49803, 49618) Cassandra example, use nodetool drain in preStop Related to https://github.com/kubernetes/kubernetes/pull/39199#discussion_r129506191pull/6/head
commit
bb67819ed1
|
@ -10,6 +10,7 @@ spec:
|
|||
labels:
|
||||
app: cassandra
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 1800
|
||||
containers:
|
||||
- name: cassandra
|
||||
image: gcr.io/google-samples/cassandra:v12
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue