From 1ef6580ea3ca5f0314026e210649860373b69b50 Mon Sep 17 00:00:00 2001 From: Jerome Touffe-Blin Date: Sat, 6 Feb 2016 08:55:22 +1100 Subject: [PATCH] Fix #19098 - misplace cassandra-controller in cassandra example --- examples/cassandra/README.md | 74 +++++++++----------- examples/cassandra/cassandra-controller.yaml | 2 +- examples/cassandra/cassandra-daemonset.yaml | 2 +- examples/cassandra/cassandra.yaml | 2 +- 4 files changed, 37 insertions(+), 43 deletions(-) diff --git a/examples/cassandra/README.md b/examples/cassandra/README.md index 6a1def3b472..24567bf252e 100644 --- a/examples/cassandra/README.md +++ b/examples/cassandra/README.md @@ -53,54 +53,48 @@ This is a somewhat long tutorial. If you want to jump straight to the "do it no In Kubernetes, the atomic unit of an application is a [_Pod_](../../docs/user-guide/pods.md). A Pod is one or more containers that _must_ be scheduled onto the same host. All containers in a pod share a network namespace, and may optionally share mounted volumes. In this simple case, we define a single container running Cassandra for our pod: - + ```yaml apiVersion: v1 -kind: ReplicationController +kind: Pod metadata: labels: app: cassandra name: cassandra spec: - replicas: 1 - template: - metadata: - labels: - app: cassandra - spec: - containers: - - command: - - /run.sh - resources: - limits: - cpu: 0.1 - env: - - name: MAX_HEAP_SIZE - value: 512M - - name: HEAP_NEWSIZE - value: 100M - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: gcr.io/google_containers/cassandra:v7 - name: cassandra - ports: - - containerPort: 9042 - name: cql - - containerPort: 9160 - name: thrift - volumeMounts: - - mountPath: /cassandra_data - name: data - volumes: - - name: data - emptyDir: {} + containers: + - args: + - /run.sh + resources: + limits: + cpu: "0.1" + image: gcr.io/google_containers/cassandra:v6 + name: cassandra + ports: + - name: cql + containerPort: 9042 + - name: thrift + containerPort: 9160 + volumeMounts: + - name: data + mountPath: /cassandra_data + env: + - name: MAX_HEAP_SIZE + value: 512M + - name: HEAP_NEWSIZE + value: 100M + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + volumes: + - name: data + emptyDir: {} ``` -[Download example](cassandra-controller.yaml?raw=true) - +[Download example](cassandra.yaml?raw=true) + There are a few things to note in this description. First is that we are running the [```gcr.io/google_containers/cassandra:v6```](image/Dockerfile) image from Google's [container registry](https://cloud.google.com/container-registry/docs/). This is a standard Cassandra installation on top of Debian. However it also adds a custom [```SeedProvider```](https://svn.apache.org/repos/asf/cassandra/trunk/src/java/org/apache/cassandra/locator/SeedProvider.java) to Cassandra. In Cassandra, a ```SeedProvider``` bootstraps the gossip protocol that Cassandra uses to find other nodes. The [```KubernetesSeedProvider```](#seed-provider-source) discovers the Kubernetes API Server using the built in Kubernetes discovery service, and then uses the Kubernetes API to find new nodes (more on this later) @@ -223,7 +217,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: gcr.io/google_containers/cassandra:v7 + image: gcr.io/google_containers/cassandra:v6 name: cassandra ports: - containerPort: 9042 @@ -340,7 +334,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: "gcr.io/google_containers/cassandra:v7" + image: "gcr.io/google_containers/cassandra:v6" name: cassandra ports: - containerPort: 9042 diff --git a/examples/cassandra/cassandra-controller.yaml b/examples/cassandra/cassandra-controller.yaml index 5fe6eefd5c1..63ea8dbd40a 100644 --- a/examples/cassandra/cassandra-controller.yaml +++ b/examples/cassandra/cassandra-controller.yaml @@ -26,7 +26,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: gcr.io/google_containers/cassandra:v7 + image: gcr.io/google_containers/cassandra:v6 name: cassandra ports: - containerPort: 9042 diff --git a/examples/cassandra/cassandra-daemonset.yaml b/examples/cassandra/cassandra-daemonset.yaml index 259cd36e0cf..8b6f76b3f28 100644 --- a/examples/cassandra/cassandra-daemonset.yaml +++ b/examples/cassandra/cassandra-daemonset.yaml @@ -25,7 +25,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: "gcr.io/google_containers/cassandra:v7" + image: "gcr.io/google_containers/cassandra:v6" name: cassandra ports: - containerPort: 9042 diff --git a/examples/cassandra/cassandra.yaml b/examples/cassandra/cassandra.yaml index ff286a45821..be6c32a3f64 100644 --- a/examples/cassandra/cassandra.yaml +++ b/examples/cassandra/cassandra.yaml @@ -11,7 +11,7 @@ spec: resources: limits: cpu: "0.1" - image: gcr.io/google_containers/cassandra:v7 + image: gcr.io/google_containers/cassandra:v6 name: cassandra ports: - name: cql