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:
|
labels:
|
||||||
app: cassandra
|
app: cassandra
|
||||||
spec:
|
spec:
|
||||||
|
terminationGracePeriodSeconds: 1800
|
||||||
containers:
|
containers:
|
||||||
- name: cassandra
|
- name: cassandra
|
||||||
image: gcr.io/google-samples/cassandra:v12
|
image: gcr.io/google-samples/cassandra:v12
|
||||||
|
@ -37,7 +38,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
|
||||||
|
|
Loading…
Reference in New Issue