apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: upstream
spec:
  selector:
    matchLabels:
      app: upstream
  replicas: 1 # tells deployment to run 2 pods matching the template
  template:
    metadata:
      labels:
        app: upstream
    spec:
      nodeSelector:
        agentpool: captain
      containers:
        - name: upstream
          image: signalrbenchmark/perf:1.4.4
          resources:
            requests:
              cpu: 100m
              memory: 1024Mi
            limits:
              cpu: 150m
              memory: 1024Mi
          volumeMounts:
            - mountPath: "/mnt/perf"
              name: volume
          command: ["/bin/sh", "-c"]
          args: ["cp /mnt/perf/manifest/SignalRUpstream/SignalRUpstream.zip /home ; cd /home ; unzip SignalRUpstream.zip ; exec ./SignalRUpstream"]
      volumes:
        - name: volume
          azureFile:
            secretName: azure-secret
            shareName: perf
            readOnly: false
