trmm-awesome/kubernetes/deployment/tactical-web.yaml
2022-07-08 15:34:12 -07:00

101 lines
2.8 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
namespace: tacticalrmm
labels:
app: tacticalrmm
service: tactical-nlb
name: tactical-web
spec:
replicas: 1
selector:
matchLabels:
service: tactical-nlb
strategy:
type: Recreate
template:
metadata:
labels:
network/proxy: "true"
service: tactical-nlb
spec:
securityContext:
runAsUser: 1000
fsGroup: 1000
containers:
- name: nginx
image: tacticalrmm/tactical-nginx:0.14.1
resources: {}
env:
- name: API_HOST
value: api.rmm.mydomain.com
- name: APP_HOST
value: rmm.mydomain.com
- name: MESH_HOST
value: mesh.rmm.mydomain.com
- name: NGINX_RESOLVER
value: kube-dns.kube-system.svc.cluster.local
- name: BACKEND_SERVICE
value: tactical-backend.tacticalrmm.svc.cluster.local
- name: FRONTEND_SERVICE
value: tactical-frontend.tacticalrmm.svc.cluster.local
- name: MESH_SERVICE
value: tactical-meshcentral.tacticalrmm.svc.cluster.local
- name: WEBSOCKETS_SERVICE
value: tactical-websockets.tacticalrmm.svc.cluster.local
- name: NATS_SERVICE
value: tactical-nats.tacticalrmm.svc.cluster.local
- name: CERT_PUB_PATH
value: /etc/ssl/certs/custom/tls.crt
- name: CERT_PRIV_PATH
value: /etc/ssl/certs/custom/tls.key
ports:
- containerPort: 8080
- containerPort: 4443
volumeMounts:
- mountPath: /opt/tactical
name: tactical-data
- mountPath: /etc/ssl/certs/custom
name: tactical-certs
- name: trmm-nats
image: tacticalrmm/tactical-nats:0.14.1
resources: {}
env:
- name: API_HOST
value: api.rmm.mydomain.com
- name: NATS_CONFIG_CHECK_INTERVAL
value: "10"
ports:
- containerPort: 4222
- containerPort: 9235
volumeMounts:
- mountPath: /opt/tactical
name: tactical-data
- mountPath: /etc/ssl/certs/custom
name: tactical-certs
restartPolicy: Always
volumes:
- name: tactical-data
persistentVolumeClaim:
claimName: tactical-data
- name: tactical-certs
secret:
secretName: rmm-mydomain-com-tls
status: {}
---
apiVersion: v1
kind: Service
metadata:
namespace: tacticalrmm
labels:
app: tacticalrmm
service: tactical-nats
name: tactical-nats
spec:
type: ClusterIP
ports:
- name: "nats-ws"
port: 9235
selector:
service: tactical-nlb