apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: agent-scaler
  name: agent-scaler-deployment
  namespace: joshua
spec:
  replicas: 1
  selector:
    matchLabels:
      app: agent-scaler
  template:
    metadata:
      labels:
        app: agent-scaler
      name: agent-scaler-app
    spec:
      containers:
      - env:
        - name: MAX_JOBS
          value: "5"
        - name: CHECK_DELAY
          value: "10"
        image: foundationdb/agent-scaler:latest
        imagePullPolicy: IfNotPresent
        name: agent-scaler-container
        volumeMounts:
        - mountPath: /etc/foundationdb
          name: fdb-cluster
          readOnly: true
        - mountPath: /template
          name: joshua-agent-yaml
          readOnly: true
      serviceAccountName: joshua-sa
      volumes:
      - configMap:
          items:
          - key: fdb.cluster
            path: fdb.cluster
          name: fdb-cluster-file
        name: fdb-cluster
      - configMap:
          items:
          - key: joshua-agent.yaml.template
            path: joshua-agent.yaml.template
          name: joshua-agent-template
        name: joshua-agent-yaml
