Skip to content

Commit 2845293

Browse files
aledbfahmetb
authored andcommitted
Improve cassandra deployment (#199)
1 parent b8bf4f4 commit 2845293

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

cassandra/cassandra-statefulset.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ spec:
1515
labels:
1616
app: cassandra
1717
spec:
18+
terminationGracePeriodSeconds: 1800
1819
containers:
1920
- name: cassandra
20-
image: gcr.io/google-samples/cassandra:v12
21+
image: gcr.io/google-samples/cassandra:v13
2122
imagePullPolicy: Always
2223
ports:
2324
- containerPort: 7000
@@ -42,7 +43,10 @@ spec:
4243
lifecycle:
4344
preStop:
4445
exec:
45-
command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done"]
46+
command:
47+
- /bin/sh
48+
- -c
49+
- nodetool drain
4650
env:
4751
- name: MAX_HEAP_SIZE
4852
value: 512M
@@ -56,8 +60,6 @@ spec:
5660
value: "DC1-K8Demo"
5761
- name: CASSANDRA_RACK
5862
value: "Rack1-K8Demo"
59-
- name: CASSANDRA_AUTO_BOOTSTRAP
60-
value: "false"
6163
- name: POD_IP
6264
valueFrom:
6365
fieldRef:

0 commit comments

Comments
 (0)