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