planetmint/k8s/nginx-openresty/nginx-openresty-dep.yaml
2022-01-20 08:13:25 +00:00

70 lines
1.9 KiB
YAML

# Copyright © 2020 Interplanetary Database Association e.V.,
# Planetmint and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
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: planetmint/nginx_3scale:2.2.2
imagePullPolicy: IfNotPresent
env:
- name: DNS_SERVER
valueFrom:
configMapKeyRef:
name: vars
key: node-dns-server-ip
- name: OPENRESTY_FRONTEND_PORT
valueFrom:
configMapKeyRef:
name: vars
key: openresty-backend-port
- name: PLANETMINT_BACKEND_HOST
valueFrom:
configMapKeyRef:
name: vars
key: ngx-bdb-instance-name
- name: PLANETMINT_API_PORT
valueFrom:
configMapKeyRef:
name: vars
key: planetmint-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