# loadr controller: agents join on :7625, runs are submitted to :6464.
apiVersion: apps/v1
kind: Deployment
metadata:
  name: loadr-controller
  labels: { app: loadr, role: controller }
spec:
  replicas: 1
  selector:
    matchLabels: { app: loadr, role: controller }
  template:
    metadata:
      labels: { app: loadr, role: controller }
    spec:
      containers:
        - name: controller
          image: ghcr.io/levantar-ai/loadr:v1
          args: ["controller", "--bind", "0.0.0.0:7625", "--ui-bind", "0.0.0.0:6464"]
          ports:
            - { name: join, containerPort: 7625 }
            - { name: api, containerPort: 6464 }
          readinessProbe:
            tcpSocket: { port: 6464 }
            initialDelaySeconds: 3
            periodSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
  name: loadr-controller
  labels: { app: loadr, role: controller }
spec:
  selector: { app: loadr, role: controller }
  ports:
    - { name: join, port: 7625, targetPort: join }
    - { name: api, port: 6464, targetPort: api }
