apiVersion: apps/v1
kind: Deployment
metadata:
  name: dasher

spec:
  replicas: 2
  selector:
    matchLabels:
      name: dasher
  template:
    metadata:
      labels:
        name: dasher
    spec:
      containers:
        - name: uwsgi
          imagePullPolicy: "Always"
          image: "lsstsqre/ltd-dasher"
          ports:
            - containerPort: 3031
              name: dasher
          readinessProbe:
            httpGet:
              path: /healthz
              port: dasher
            initialDelaySeconds: 3
            periodSeconds: 3
          env:
            - name: LTD_DASHER_PROFILE
              value: production
            - name: LTD_DASHER_AWS_ID
              valueFrom:
                secretKeyRef:
                  name: keeper
                  key: aws-id
            - name: LTD_DASHER_AWS_SECRET
              valueFrom:
                secretKeyRef:
                  name: keeper
                  key: aws-secret
            - name: LTD_DASHER_FASTLY_ID
              valueFrom:
                secretKeyRef:
                  name: keeper
                  key: fastly-id
            - name: LTD_DASHER_FASTLY_KEY
              valueFrom:
                secretKeyRef:
                  name: keeper
                  key: fastly-key
