---
apiVersion: batch/v1
kind: Job
metadata:
  name: kraken
spec:
  parallelism: 1
  completions: 1
  template:
    metadata:
      labels:
        tool: Kraken
    spec:
      serviceAccountName: useroot
      containers:
        - name: kraken
          securityContext:
            privileged: true
          image: quay.io/openshift-scale/kraken
          command: ["/bin/sh", "-c"]
          args: ["python3 run_kraken.py -c config/config.yaml"]
          volumeMounts:
            - mountPath: "/root/.kube"
              name: config
            - mountPath: "/root/kraken/config"
              name: kraken-config
            - mountPath: "/root/kraken/scenarios"
              name: scenarios-config
      restartPolicy: Never
      volumes:
        - name: config
          configMap:
            name: kube-config
        - name: kraken-config
          configMap:
            name: kraken-config
        - name: scenarios-config
          configMap:
            name: scenarios-config
