manifest.template.yml

  1---
  2apiVersion: v1
  3kind: Namespace
  4metadata:
  5  name: ${ZED_KUBE_NAMESPACE}
  6---
  7kind: Service
  8apiVersion: v1
  9metadata:
 10  namespace: ${ZED_KUBE_NAMESPACE}
 11  name: collab
 12  annotations:
 13    service.beta.kubernetes.io/do-loadbalancer-tls-ports: "443"
 14    service.beta.kubernetes.io/do-loadbalancer-certificate-id: "08d9d8ce-761f-4ab3-bc78-4923ab5b0e33"
 15spec:
 16  type: LoadBalancer
 17  selector:
 18    app: collab
 19  ports:
 20    - name: web
 21      protocol: TCP
 22      port: 443
 23      targetPort: 8080
 24---
 25apiVersion: apps/v1
 26kind: Deployment
 27metadata:
 28  namespace: ${ZED_KUBE_NAMESPACE}
 29  name: collab
 30
 31spec:
 32  replicas: 1
 33  selector:
 34    matchLabels:
 35      app: collab
 36  template:
 37    metadata:
 38      labels:
 39        app: collab
 40      annotations:
 41        ad.datadoghq.com/collab.check_names: |
 42          ["openmetrics"]
 43        ad.datadoghq.com/collab.init_configs: |
 44          [{}]
 45        ad.datadoghq.com/collab.instances: |
 46          [
 47              {
 48              "openmetrics_endpoint": "http://%%host%%:%%port%%/metrics",
 49              "namespace": "collab_${ZED_KUBE_NAMESPACE}",
 50              "metrics": [".*"]
 51              }
 52          ]
 53    spec:
 54      containers:
 55        - name: collab
 56          image: "${ZED_IMAGE_ID}"
 57          args:
 58            - serve
 59          ports:
 60            - containerPort: 8080
 61              protocol: TCP
 62          readinessProbe:
 63            httpGet:
 64              path: /
 65              port: 8080
 66            initialDelaySeconds: 1
 67            periodSeconds: 1
 68          env:
 69            - name: HTTP_PORT
 70              value: "8080"
 71            - name: DATABASE_URL
 72              valueFrom:
 73                secretKeyRef:
 74                  name: database
 75                  key: url
 76            - name: API_TOKEN
 77              valueFrom:
 78                secretKeyRef:
 79                  name: api
 80                  key: token
 81            - name: LIVE_KIT_SERVER
 82              valueFrom:
 83                secretKeyRef:
 84                  name: livekit
 85                  key: server
 86            - name: LIVE_KIT_KEY
 87              valueFrom:
 88                secretKeyRef:
 89                  name: livekit
 90                  key: key
 91            - name: LIVE_KIT_SECRET
 92              valueFrom:
 93                secretKeyRef:
 94                  name: livekit
 95                  key: secret
 96            - name: INVITE_LINK_PREFIX
 97              value: ${INVITE_LINK_PREFIX}
 98            - name: RUST_LOG
 99              value: ${RUST_LOG}
100            - name: LOG_JSON
101              value: "true"
102            - name: ZED_ENVIRONMENT
103              value: ${ZED_ENVIRONMENT}
104          securityContext:
105            capabilities:
106              # FIXME - Switch to the more restrictive `PERFMON` capability.
107              # This capability isn't yet available in a stable version of Debian.
108              add: ["SYS_ADMIN"]