apiVersion: v1
kind: ReplicationController
metadata:
  name: vs-rc
spec:
  replicas: 3
  selector:
    app: vs-pod
  template:
    metadata:
      name: vs-pod
      labels:
        app: vs-pod
    spec:
      containers:
        - name: vs-pod
          image: shippedrepos-docker-vaquero.bintray.io/vaquero/vaquero:latest
          args:
            - "server"
            - "--config"
            - "/config/config.yaml"
          env:
            - name: VAQUERO_SHARED_SECRET
              value: "shared"
            - name: VAQUERO_SERVER_SECRET
              value: "server"
            - name: VAQUERO_SITE_ID
              value: "test-site"
            - name: VAQUERO_AGENT_ID
              value: "test-agent"
          ports:
            - containerPort: 24601
            - containerPort: 24603
            - containerPort: 24604
          readinessProbe:
            httpGet:
              path: /ready
              port: 24604
            initialDelaySeconds: 5
            periodSeconds: 1
          volumeMounts:
            - mountPath: /config
              name: config
            - mountPath: /secret
              name: ssh
            - mountPath: /dm
              name: dm
      volumes:
        - name: dm
          hostPath:
            path: /vagrant/local
        - name: config
          configMap:
            name: vs-config
            items:
            - key: vs-config.yaml
              path: config.yaml
        - name: ssh
          secret:
            secretName: ssh-key
            items:
            - key: server.pem
              path: server.pem
            - key: server.key
              path: server.key
