apiVersion: apps/v1
kind: Deployment
metadata:
  name: coordinator-deployment
spec:
  selector:
    matchLabels:
      app: coordinator
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: coordinator
    spec:
      containers:
        - name: coordinator
          image: coordinator
          imagePullPolicy: Always
          ports:
            - containerPort: 8081
              protocol: TCP
          env:
            - name: REDIS_AUTH
              valueFrom:
                secretKeyRef:
                  name: redis-auth
                  key: redis-password
            - name: XAYNET__REDIS__URL
              value: "redis://:$(REDIS_AUTH)@redis-master"
            - name: XAYNET__S3__ACCESS_KEY
              valueFrom:
                secretKeyRef:
                  name: minio-auth
                  key: accesskey
            - name: XAYNET__S3__SECRET_ACCESS_KEY
              valueFrom:
                secretKeyRef:
                  name: minio-auth
                  key: secretkey
