From d432d6bafeaa36cb05709e613fd0d57a8b78a784 Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Fri, 23 Feb 2018 15:11:45 -0300 Subject: [PATCH] Update cassandra tutorial (#7478) --- docs/tutorials/stateful-application/cassandra.md | 4 ++-- .../cassandra/cassandra-statefulset.yaml | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/tutorials/stateful-application/cassandra.md b/docs/tutorials/stateful-application/cassandra.md index bda194783d..9f75b40c1d 100644 --- a/docs/tutorials/stateful-application/cassandra.md +++ b/docs/tutorials/stateful-application/cassandra.md @@ -11,9 +11,9 @@ Deploying stateful distributed applications, like Cassandra, within a clustered **Cassandra Docker** -The Pods use the [`gcr.io/google-samples/cassandra:v12`](https://github.com/kubernetes/examples/blob/master/cassandra/image/Dockerfile) +The Pods use the [`gcr.io/google-samples/cassandra:v13`](https://github.com/kubernetes/examples/blob/master/cassandra/image/Dockerfile) image from Google's [container registry](https://cloud.google.com/container-registry/docs/). -The docker is based on `debian:jessie` and includes OpenJDK 8. This image includes a standard Cassandra installation from the Apache Debian repo. By using environment variables you can change values that are inserted into `cassandra.yaml`. +The docker image above is based on [debian-base](https://github.com/kubernetes/kubernetes/tree/master/build/debian-base) and includes OpenJDK 8. This image includes a standard Cassandra installation from the Apache Debian repo. By using environment variables you can change values that are inserted into `cassandra.yaml`. | ENV VAR | DEFAULT VALUE | | ------------- |:-------------: | diff --git a/docs/tutorials/stateful-application/cassandra/cassandra-statefulset.yaml b/docs/tutorials/stateful-application/cassandra/cassandra-statefulset.yaml index dbcba6cbc7..24d6ff208d 100644 --- a/docs/tutorials/stateful-application/cassandra/cassandra-statefulset.yaml +++ b/docs/tutorials/stateful-application/cassandra/cassandra-statefulset.yaml @@ -15,9 +15,10 @@ spec: labels: app: cassandra spec: + terminationGracePeriodSeconds: 1800 containers: - name: cassandra - image: gcr.io/google-samples/cassandra:v12 + image: gcr.io/google-samples/cassandra:v13 imagePullPolicy: Always ports: - containerPort: 7000 @@ -42,7 +43,10 @@ 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 @@ -56,8 +60,6 @@ spec: value: "DC1-K8Demo" - name: CASSANDRA_RACK value: "Rack1-K8Demo" - - name: CASSANDRA_AUTO_BOOTSTRAP - value: "false" - name: POD_IP valueFrom: fieldRef: