Run bdb:latest with rdb:2.3 as separate containers in the same pod

This commit is contained in:
krish7919 (Krish) 2017-03-03 12:07:49 +01:00
parent 64f4afb7ad
commit 9228e69355

View File

@ -1,6 +1,6 @@
##################################################### ##################################################################
# This config file uses bdb v0.9.1 with bundled rdb # # This config file uses bdb:latest with a spearate rethinkdb:2.3 #
##################################################### ##################################################################
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -37,8 +37,8 @@ spec:
annotations: annotations:
pod.beta.kubernetes.io/init-containers: '[ pod.beta.kubernetes.io/init-containers: '[
{ {
"name": "bdb091-configure", "name": "bdb-configure",
"image": "bigchaindb/bigchaindb:0.9.1", "image": "bigchaindb/bigchaindb:latest",
"command": ["bigchaindb", "-y", "configure", "rethinkdb"], "command": ["bigchaindb", "-y", "configure", "rethinkdb"],
"volumeMounts": [ "volumeMounts": [
{ {
@ -52,7 +52,7 @@ spec:
terminationGracePeriodSeconds: 10 terminationGracePeriodSeconds: 10
containers: containers:
- name: bdb091-server - name: bdb091-server
image: bigchaindb/bigchaindb:0.9.1 image: bigchaindb/bigchaindb:latest
args: args:
- -c - -c
- /data/.bigchaindb - /data/.bigchaindb
@ -82,8 +82,42 @@ spec:
port: 9984 port: 9984
initialDelaySeconds: 15 initialDelaySeconds: 15
timeoutSeconds: 10 timeoutSeconds: 10
- name: rethinkdb
image: rethinkdb:2.3
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
hostPort: 8080
name: rdb-http-port
protocol: TCP
- containerPort: 28015
hostPort: 28015
name: rdb-client-port
protocol: TCP
volumeMounts:
- name: rdb-data
mountPath: /data
resources:
limits:
cpu: 200m
memory: 768Mi
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 15
timeoutSeconds: 10
readinessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 15
timeoutSeconds: 10
restartPolicy: Always restartPolicy: Always
volumes: volumes:
- name: bigchaindb-data - name: bigchaindb-data
hostPath: hostPath:
path: /disk/bigchaindb-data path: /disk/bigchaindb-data
- name: rdb-data
hostPath:
path: /disk/rdb-data