apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: sharder
  namespace: "{{namespace}}"
spec:
  selector:
    matchLabels:
      app: sharder
  replicas: 0
  serviceName: "shard-orchestrator"
  template:
    metadata:
      labels:
        app: sharder
    spec:
      containers:
      - name: sharder
        image: oxyl/sharder:{{tag}}
        imagePullPolicy: Always
        env:
          - name: NODE_ENV
            valueFrom:
              configMapKeyRef:
                name: config
                key: environment
          - name: TOKEN
            valueFrom: 
              secretKeyRef:
                name: discord
                key: token
        ports:
          - containerPort: 8503
            name: http