# Relay (ZMQ router)
---
apiVersion: v1
kind: Service
metadata:
  name: relay
spec:
  selector:
    app: relay
  ports:
    - name: market-data
      protocol: TCP
      port: 5558
      targetPort: 5558
    - name: client-requests
      protocol: TCP
      port: 5559
      targetPort: 5559
  type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: relay
spec:
  replicas: 1
  selector:
    matchLabels:
      app: relay
  template:
    metadata:
      labels:
        app: relay
    spec:
      containers:
      - name: relay
        image: dexorder/ai-relay
        imagePullPolicy: Always
        ports:
        - containerPort: 5558
          name: market-data
        - containerPort: 5559
          name: client-requests
        env:
        - name: RUST_LOG
          value: relay=info
        - name: CONFIG_PATH
          value: /config/config.yaml
        volumeMounts:
        - name: relay-config
          mountPath: /config
      volumes:
      - name: relay-config
        configMap:
          name: relay-config
