apiVersion: apps/v1
kind: Deployment
metadata:
  name: es-rally
  labels:
    app: es-rally
spec:
  replicas: 1
  selector:
    matchLabels:
      app: es-rally
  template:
    metadata:
      labels:
        app: es-rally
    spec:
      containers:
      - name: es-rally
        image: disrani/es-rally:latest
        imagePullPolicy: IfNotPresent
        resources:
          limits:
            cpu: "2"
            memory: 4Gi
          requests:
            cpu: "1"
            memory: 4Gi
        env:
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        command: [ "esrally" ]
        args: [ "--target-hosts",
                "elasticsearch-api",
                "--track",
                "eventdata",
                "--track-repository",
                "eventdata",
                "--challenge",
                "elasticlogs-1bn-load",
                "--pipeline",
                "benchmark-only",
                "--track-params",
                "index_name:'index2',index_alias:'index2',clients:10"
        ]
      restartPolicy: Always
