apiVersion: apps/v1
kind: Deployment
metadata:
  name: shard-orchestrator
  namespace: "{{namespace}}"
spec:
  selector:
    matchLabels:
      app: shard-orchestrator
  replicas: 1
  template:
    metadata:
      labels:
        app: shard-orchestrator
    spec:
      serviceAccountName: sharder-scaling
      containers:
      - name: shard-orchestrator
        image: oxyl/shard-orchestrator:{{tag}}
        imagePullPolicy: Always
        env:
          - name: NODE_ENV
            valueFrom:
              configMapKeyRef:
                name: config
                key: environment
          - name: SHARDS_PER_SHARDER
            value: "5"
          - name: NAMESPACE
            value: "{{namespace}}"
          - name: SHARDER_API_PORT 
            value: "8503"
        ports:
        - containerPort: 8501
          name: http