mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
68 lines
2.0 KiB
YAML
68 lines
2.0 KiB
YAML
###############################################################
|
|
# This config file runs nginx as a k8s deployment and exposes #
|
|
# it using an external load balancer. #
|
|
# This deployment is used as a front end to both BigchainDB #
|
|
# and MongoDB. #
|
|
###############################################################
|
|
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: ngx-instance-0-dep
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: ngx-instance-0-dep
|
|
spec:
|
|
terminationGracePeriodSeconds: 10
|
|
containers:
|
|
- name: nginx
|
|
image: bigchaindb/nginx:1.0
|
|
imagePullPolicy: Always
|
|
env:
|
|
- name: MONGODB_FRONTEND_PORT
|
|
value: "27017"
|
|
- name: MONGODB_BACKEND_HOST
|
|
value: mdb-instance-0.default.svc.cluster.local
|
|
- name: MONGODB_BACKEND_PORT
|
|
value: "27017"
|
|
- name: BIGCHAINDB_FRONTEND_PORT
|
|
value: "80"
|
|
- name: BIGCHAINDB_BACKEND_HOST
|
|
value: bdb-instance-0.default.svc.cluster.local
|
|
- name: BIGCHAINDB_BACKEND_PORT
|
|
value: "9984"
|
|
- name: BIGCHAINDB_WS_FRONTEND_PORT
|
|
value: "81"
|
|
- name: BIGCHAINDB_WS_BACKEND_PORT
|
|
value: "9985"
|
|
- name: DNS_SERVER
|
|
value: "10.0.0.10"
|
|
- name: MONGODB_WHITELIST
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: mongodb-whitelist
|
|
key: allowed-hosts
|
|
ports:
|
|
- containerPort: 27017
|
|
hostPort: 27017
|
|
name: public-mdb-port
|
|
protocol: TCP
|
|
- containerPort: 80
|
|
hostPort: 80
|
|
name: public-bdb-port
|
|
protocol: TCP
|
|
- containerPort: 81
|
|
hostPort: 81
|
|
name: public-ws-port
|
|
protocol: TCP
|
|
resources:
|
|
limits:
|
|
cpu: 200m
|
|
memory: 768Mi
|
|
#livenessProbe: TODO(Krish)
|
|
#readinessProbe: TODO(Krish)
|
|
restartPolicy: Always
|