netmaker/kube/components/netmaker-api.yaml

98 lines
2.2 KiB
YAML
Raw Normal View History

2021-07-08 05:12:24 +08:00
apiVersion: apps/v1
kind: Deployment
metadata:
2021-07-16 03:27:34 +08:00
name: netmaker-api
2021-07-08 05:12:24 +08:00
labels:
2021-07-16 03:27:34 +08:00
app: netmaker-api
2021-07-08 05:12:24 +08:00
spec:
selector:
matchLabels:
2021-07-16 03:27:34 +08:00
app: netmaker-api
2021-07-08 05:12:24 +08:00
replicas: 1
template:
metadata:
labels:
2021-07-16 03:27:34 +08:00
app: netmaker-api
2021-07-08 05:12:24 +08:00
spec:
containers:
2021-07-16 03:27:34 +08:00
- name: netmaker-api
image: gravitl/netmaker:v0.5.7
2021-07-08 05:12:24 +08:00
ports:
- containerPort: 8081
2021-07-16 03:27:34 +08:00
volumeMounts:
- name: nm-pvc
mountPath: /root/config/dnsconfig
2021-07-08 05:12:24 +08:00
env:
2021-07-16 03:27:34 +08:00
- 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: "netmaker-dns"
- name: GRPC_SSL
value: "on"
- name: SERVER_HTTP_HOST
value: "api.nm.k8s.gravitl.com"
- name: SERVER_GRPC_HOST
value: "grpc.nm.k8s.gravitl.com"
2021-07-08 05:12:24 +08:00
- name: API_PORT
value: "8081"
2021-07-16 03:27:34 +08:00
- name: GRPC_PORT
value: "50051"
2021-07-08 05:12:24 +08:00
- name: AGENT_BACKEND
value: "off"
- name: CLIENT_MODE
value: "off"
- name: DNS_MODE
2021-07-16 03:27:34 +08:00
value: "on"
2021-07-08 05:12:24 +08:00
- 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"
2021-07-16 03:27:34 +08:00
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
2021-07-08 05:12:24 +08:00
---
apiVersion: v1
kind: Service
metadata:
labels:
2021-07-16 03:27:34 +08:00
app: netmaker-api
name: netmaker-api
2021-07-08 05:12:24 +08:00
spec:
ports:
- port: 8081
protocol: TCP
targetPort: 8081
selector:
2021-07-16 03:27:34 +08:00
app: netmaker-api
2021-07-08 05:12:24 +08:00
sessionAffinity: None
type: ClusterIP