mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 10:19:50 +00:00
Merge pull request #3352 from brendandburns/cassandra
Update cassandra example
This commit is contained in:
commit
ce4411547c
@ -12,7 +12,7 @@ desiredState:
|
|||||||
id: cassandra
|
id: cassandra
|
||||||
containers:
|
containers:
|
||||||
- name: cassandra
|
- name: cassandra
|
||||||
image: kubernetes/cassandra
|
image: kubernetes/cassandra:v1
|
||||||
command:
|
command:
|
||||||
- /run.sh
|
- /run.sh
|
||||||
cpu: 1000
|
cpu: 1000
|
||||||
@ -21,10 +21,17 @@ desiredState:
|
|||||||
containerPort: 9042
|
containerPort: 9042
|
||||||
- name: thrift
|
- name: thrift
|
||||||
containerPort: 9160
|
containerPort: 9160
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /cassandra_data
|
||||||
env:
|
env:
|
||||||
- key: MAX_HEAP_SIZE
|
- key: MAX_HEAP_SIZE
|
||||||
value: 512M
|
value: 512M
|
||||||
- key: HEAP_NEWSIZE
|
- key: HEAP_NEWSIZE
|
||||||
value: 100M
|
value: 100M
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
source:
|
||||||
|
emptyDir: {}
|
||||||
labels:
|
labels:
|
||||||
name: cassandra
|
name: cassandra
|
||||||
|
@ -7,7 +7,7 @@ desiredState:
|
|||||||
id: cassandra
|
id: cassandra
|
||||||
containers:
|
containers:
|
||||||
- name: cassandra
|
- name: cassandra
|
||||||
image: kubernetes/cassandra
|
image: kubernetes/cassandra:v1
|
||||||
command:
|
command:
|
||||||
- /run.sh
|
- /run.sh
|
||||||
cpu: 1000
|
cpu: 1000
|
||||||
@ -16,6 +16,9 @@ desiredState:
|
|||||||
containerPort: 9042
|
containerPort: 9042
|
||||||
- name: thrift
|
- name: thrift
|
||||||
containerPort: 9160
|
containerPort: 9160
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /cassandra_data
|
||||||
env:
|
env:
|
||||||
- key: MAX_HEAP_SIZE
|
- key: MAX_HEAP_SIZE
|
||||||
value: 512M
|
value: 512M
|
||||||
@ -23,6 +26,10 @@ desiredState:
|
|||||||
value: 100M
|
value: 100M
|
||||||
- key: KUBERNETES_API_PROTOCOL
|
- key: KUBERNETES_API_PROTOCOL
|
||||||
value: http
|
value: http
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
source:
|
||||||
|
emptyDir: {}
|
||||||
labels:
|
labels:
|
||||||
name: cassandra
|
name: cassandra
|
||||||
|
|
||||||
|
@ -17,5 +17,6 @@ RUN apt-get -qq -y install cassandra
|
|||||||
COPY cassandra.yaml /etc/cassandra/cassandra.yaml
|
COPY cassandra.yaml /etc/cassandra/cassandra.yaml
|
||||||
COPY run.sh /run.sh
|
COPY run.sh /run.sh
|
||||||
COPY kubernetes-cassandra.jar /kubernetes-cassandra.jar
|
COPY kubernetes-cassandra.jar /kubernetes-cassandra.jar
|
||||||
|
RUN chmod a+x /run.sh
|
||||||
|
|
||||||
CMD /run.sh
|
CMD /run.sh
|
||||||
|
@ -96,12 +96,12 @@ partitioner: org.apache.cassandra.dht.Murmur3Partitioner
|
|||||||
# the configured compaction strategy.
|
# the configured compaction strategy.
|
||||||
# If not set, the default directory is $CASSANDRA_HOME/data/data.
|
# If not set, the default directory is $CASSANDRA_HOME/data/data.
|
||||||
data_file_directories:
|
data_file_directories:
|
||||||
- /var/lib/cassandra/data
|
- /cassandra_data/data
|
||||||
|
|
||||||
# commit log. when running on magnetic HDD, this should be a
|
# commit log. when running on magnetic HDD, this should be a
|
||||||
# separate spindle than the data directories.
|
# separate spindle than the data directories.
|
||||||
# If not set, the default directory is $CASSANDRA_HOME/data/commitlog.
|
# If not set, the default directory is $CASSANDRA_HOME/data/commitlog.
|
||||||
commitlog_directory: /var/lib/cassandra/commitlog
|
commitlog_directory: /cassandra_data/commitlog
|
||||||
|
|
||||||
# policy for data disk failures:
|
# policy for data disk failures:
|
||||||
# die: shut down gossip and Thrift and kill the JVM for any fs errors or
|
# die: shut down gossip and Thrift and kill the JVM for any fs errors or
|
||||||
|
Loading…
Reference in New Issue
Block a user