mirror of
https://github.com/planetmint/planetmint.git
synced 2025-03-30 15:08:31 +00:00
89 lines
2.2 KiB
YAML
89 lines
2.2 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: v1
|
|
kind: Service
|
|
metadata:
|
|
name: ngx-http
|
|
namespace: default
|
|
labels:
|
|
name: ngx-http
|
|
annotations:
|
|
# NOTE: the following annotation is a beta feature and
|
|
# only available in GCE/GKE and Azure as of now
|
|
# Ref: https://kubernetes.io/docs/tutorials/services/source-ip/
|
|
service.beta.kubernetes.io/external-traffic: OnlyLocal
|
|
spec:
|
|
selector:
|
|
app: ngx-http-dep
|
|
ports:
|
|
- port: 80
|
|
targetPort: 80
|
|
name: ngx-public-bdb-port-http
|
|
protocol: TCP
|
|
- port: 27017
|
|
targetPort: 27017
|
|
name: ngx-public-mdb-port
|
|
protocol: TCP
|
|
type: LoadBalancer
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: ngx-http-dep
|
|
namespace: default
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
name: ngx-http-dep
|
|
labels:
|
|
app: ngx-http-dep
|
|
spec:
|
|
terminationGracePeriodSeconds: 10
|
|
containers:
|
|
- name: nginx-http
|
|
image: planetmint/nginx_http:1.0
|
|
imagePullPolicy: Always
|
|
env:
|
|
- name: CLUSTER_FRONTEND_PORT
|
|
value: "80"
|
|
- name: HEALTH_CHECK_PORT
|
|
value: "8080"
|
|
- name: DNS_SERVER
|
|
value: "10.0.0.10"
|
|
- name: MONGODB_FRONTEND_PORT
|
|
value: "27017"
|
|
- name: MONGODB_BACKEND_HOST
|
|
value: "mdb.default.svc.cluster.local"
|
|
- name: MONGODB_BACKEND_PORT
|
|
value: "27017"
|
|
- name: PLANETMINT_BACKEND_HOST
|
|
value: "bdb.default.svc.cluster.local"
|
|
- name: PLANETMINT_API_PORT
|
|
value: "9984"
|
|
- name: PLANETMINT_WS_PORT
|
|
value: "9985"
|
|
ports:
|
|
- containerPort: 27017
|
|
protocol: TCP
|
|
- containerPort: 80
|
|
protocol: TCP
|
|
- containerPort: 8080
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8080
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 15
|
|
failureThreshold: 3
|
|
timeoutSeconds: 10
|
|
resources:
|
|
limits:
|
|
cpu: 200m
|
|
memory: 768Mi
|
|
restartPolicy: Always
|