2016-12-08 00:37:42 +02:00

52 lines
1.1 KiB
YAML

kind: ReplicationController
apiVersion: v1
metadata:
name: mongo-rc
spec:
replicas: ${sec_no}
selector:
name: mongo-sec
template:
spec:
containers:
- image: husseingalal/mongo-k8s-config:v0.2.0
name: mongo-config
volumeMounts:
- mountPath: /opt/rancher/bin
name: utility
stdin: true
tty: true
- name: mongo-sec
image: mongo:3.4
ports:
- containerPort: 27017
volumeMounts:
- name: mongo-datadir
mountPath: /data/db
- mountPath: /opt/rancher/bin
name: utility
command:
- /opt/rancher/bin/run.sh
- mongod
- "--replSet"
- rs0
- "--smallfiles"
- "--noprealloc"
env:
- name: PRIMARY
value: "false"
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
volumes:
- name: mongo-datadir
hostPath:
path: ${mongo_volume}
- name: utility
emptyDir: {}
metadata:
labels:
secondary: "true"
name: mongo-sec