apiVersion: apps/v1
kind: Deployment
metadata:
  name: scc-worker
spec:
  replicas: 1
  selector:
    matchLabels:
      component: scc-worker
  template:
    metadata:
      labels:
        component: scc-worker
    spec:
      containers:
        -
          name: scc-worker
          image: 'socketcluster/socketcluster:v16.0.1'
          ports:
            -
              name: scc-worker
              containerPort: 8000
          env:
            -
              name: SCC_STATE_SERVER_HOST
              value: scc-state
            -
              name: SCC_INSTANCE_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            -
              name: ENV
              value: prod
          readinessProbe:
            httpGet:
              path: /health-check
              port: scc-worker
            initialDelaySeconds: 5
            timeoutSeconds: 10
          livenessProbe:
            httpGet:
              path: /health-check
              port: scc-worker
            initialDelaySeconds: 15
            timeoutSeconds: 20
