netmaker/kube/components/netmaker-backend.yaml

110 lines
2.3 KiB
YAML
Raw Normal View History

2021-07-16 03:27:34 +08:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: netmaker-backend
labels:
app: netmaker-backend
spec:
selector:
matchLabels:
app: netmaker-backend
replicas: 1
template:
metadata:
labels:
app: netmaker-backend
spec:
containers:
- name: netmaker-backend
image: gravitl/netmaker:v0.5.7
ports:
- containerPort: 8081
volumeMounts:
- name: nm-pvc
mountPath: /root/config/dnsconfig
env:
- name: SERVER_API_CONN_STRING
value: "api.nm.k8s.gravitl.com:443"
- name: SERVER_GRPC_CONN_STRING
value: "grpc.nm.k8s.gravitl.com:443"
- name: COREDNS_ADDR
value: "10.152.183.53"
- name: GRPC_SSL
value: "on"
- name: SERVER_HTTP_HOST
value: "api.k8s.gravitl.com"
- name: SERVER_GRPC_HOST
value: "grpc.k8s.gravitl.com"
- name: API_PORT
value: "8081"
- name: GRPC_PORT
value: "443"
- name: CLIENT_MODE
value: "off"
- name: MASTER_KEY
value: "Unkn0wn!"
- name: SERVER_GRPC_WIREGUARD
value: "off"
- name: MASTER_KEY
value: "secretkey"
- name: CORS_ALLOWED_ORIGIN
value: "*"
- name: DISABLE_REMOTE_IP_CHECK
value: "on"
- name: MONGO_ADMIN
value: "mongoadmin"
- name: MONGO_PASS
value: "mongopass"
- name: MONGO_HOST
value: "mongo-0.mongo"
- name: MONGO_OPTS
value: "/?authSource=admin"
volumes:
- name: nm-pvc
persistentVolumeClaim:
claimName: nm-pvc
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nm-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 128Mi
storageClassName: microk8s-hostpath
---
apiVersion: v1
kind: Service
metadata:
labels:
app: netmaker-backend
name: netmaker-api
spec:
ports:
- port: 8081
protocol: TCP
targetPort: 8081
selector:
app: netmaker-backend
sessionAffinity: None
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
labels:
app: netmaker-backend
name: netmaker-grpc
spec:
ports:
- port: 443
protocol: TCP
targetPort: 443
selector:
app: netmaker-backend
sessionAffinity: None
type: ClusterIP