bigchaindb/k8s/nginx-openresty/nginx-openresty-dep.yaml
Krish b7e13fd087 Secure WebSocket Support (#1619)
* Remove support for whitelist

* Rename nginx to nginx-api

* Remove websocket support from nginx-api

* Change nginx to nginx-api service
The nginx-api service will proxy requests to the BigchainDB HTTP API.

* Rename ngx-instance-0 to ngx-api-instance-0 in nginx_3scale

* Update nginx-api service base docker image and README

* Add nginx-ws service to support Websocket

* Add config files for simple dev setup

* WS support with split NGINX

* NGINX module as single entrypoint into the cluster.

* Tested HTTP and WS with latest configs

* Openresty as separate service

* Remove upstream api port as configuration parameter

* Changes while testing

* Adding READMEs for nginx-http and nginx-https modules

* Documentation update

* Change 'Openresty' to 'OpenResty'.
2017-07-17 13:46:05 +02:00

65 lines
1.7 KiB
YAML

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: openresty-instance-0-dep
spec:
replicas: 1
template:
metadata:
labels:
app: openresty-instance-0-dep
spec:
terminationGracePeriodSeconds: 10
containers:
- name: nginx-openresty
image: bigchaindb/nginx_3scale:2.0
imagePullPolicy: Always
env:
- name: DNS_SERVER
valueFrom:
configMapKeyRef:
name: vars
key: cluster-dns-server-ip
- name: OPENRESTY_FRONTEND_PORT
valueFrom:
configMapKeyRef:
name: vars
key: openresty-backend-port
- name: BIGCHAINDB_BACKEND_HOST
valueFrom:
configMapKeyRef:
name: vars
key: ngx-bdb-instance-name
- name: BIGCHAINDB_API_PORT
valueFrom:
configMapKeyRef:
name: vars
key: bigchaindb-api-port
ports:
- containerPort: "<openresty-backend-port from ConfigMap>"
protocol: TCP
name: openresty-port
volumeMounts:
- name: threescale-credentials
mountPath: /usr/local/openresty/nginx/conf/threescale
readOnly: true
livenessProbe:
httpGet:
path: /
port: openresty-port
initialDelaySeconds: 15
periodSeconds: 15
successThreshold: 1
failureThreshold: 3
timeoutSeconds: 10
resources:
limits:
cpu: 200m
memory: 768Mi
restartPolicy: Always
volumes:
- name: threescale-credentials
secret:
secretName: threescale-credentials
defaultMode: 0400