
apiVersion: batch/v1
kind: Job
metadata:
  labels:
    app: ozone
    component: test
  name: test-runner
spec:
  template:
    metadata:
      labels:
        app: ozone
        component: test
      name: test-runner
    spec:
      restartPolicy: Never
      containers:
      - image: flokkr/ozone:latest
        name: test
        args:
        - /opt/tests/teragen.sh
        envFrom:
        - configMapRef:
            name: ozone-client-config
        volumeMounts:
        - name: byteman
          mountPath: /opt/byteman
        - name: btm
          mountPath: /opt/btm
        env:
        - name: BYTEMAN_HOME
          value: /opt/byteman
        - name: HADOOP_OPTS
          value: -javaagent:/opt/byteman/lib/byteman.jar=script:/opt/btm/hcfs-write.btm
      initContainers:
      - name: byteman-copy
        image: elek/byteman
        command:
        - bash
        - -c
        - cp -r /tmp/byteman /opt/
        volumeMounts:
        - name: byteman
          mountPath: /opt/byteman
      volumes:
      - name: byteman
        emptyDir: {}
      - name: btm
        configMap:
          name: btm
          defaultMode: 493
