
apiVersion: batch/v1
kind: Job
metadata:
  name: load-log-indexes
  namespace: default
spec:
  template:
    spec:
      containers:
        - name: load
          image: niklaushirt/cp4waiops-tools:1.1
          imagePullPolicy: IfNotPresent
          resources:
            requests:
              memory: "64Mi"
              cpu: "150m"
            limits:
              memory: "256Mi"
              cpu: "200m"
          command:
            - /bin/sh
            - -c
            - |
              #!/bin/bash
              set -x

              export AWX_REPO=https://github.com/niklaushirt/aiops-install-awx-33.git
              git clone $AWX_REPO
              cd awx-waiops
              ./tools/02_training/robotshop-load-logs-for-training.sh
          env:
            - name: INDEX_OVERWRITE
              value : "false"
      restartPolicy: Never

  backoffLimit: 4
