apiVersion: apps/v1
kind: Deployment
metadata:
  name: soketi-server-test
  labels:
    app: soketi-server-test
    state: testing
spec:
  replicas: 1
  selector:
    matchLabels:
      app: soketi-server-test
      state: testing
  template:
    metadata:
      labels:
        app: soketi-server-test
        state: testing
        deployment-name: soketi-server-test
    spec:
      containers:
        - name: soketi
          image: quay.io/soketi/soketi:0.17-16-alpine
          env:
            - name: PRESENCE_STORAGE_DATABASE
              value: socket
          command:
            - node
            - --max-old-space-size=256
            - --max_old_space_size=256
            - --optimize_for_size
            - --optimize-for-size
            - /app/bin/server.js
            - start
          ports:
            - containerPort: 6001
            - containerPort: 9601
          resources:
            limits:
              cpu: 500m
              memory: 256Mi
            requests:
              cpu: 200m
              memory: 128Mi
          livenessProbe:
            httpGet:
              path: /health
              port: 6001
              httpHeaders:
              - name: X-Kube-Healthcheck
                value: "Yes"
            initialDelaySeconds: 5
            periodSeconds: 1
            failureThreshold: 1
            successThreshold: 1
          readinessProbe:
            httpGet:
              path: /ready
              port: 6001
              httpHeaders:
              - name: X-Kube-Healthcheck
                value: "Yes"
            initialDelaySeconds: 5
            periodSeconds: 1
            failureThreshold: 1
            successThreshold: 1
