
apiVersion: batch/v1
kind: Job
metadata:
  name: test-runner
  labels:
    app: flink
    component: test-runner
spec:
  backoffLimit: 0
  template:
    metadata:
      name: test-runner
    spec:
      restartPolicy: Never
      containers:
      - image: flokkr/flink
        name: test
        args:
        - sleep
        - infinity
        envFrom:
        - configMapRef:
            name: flink-config
        - configMapRef:
            name: ozone-client-config
        volumeMounts:
        - name: ozonefs
          mountPath: /opt/ozonefs
        env:
        - name: HADOOP_CLASSPATH
          value: /opt/flink/conf:/opt/hadoop/share/hadoop/common/lib/*:/opt/hadoop/share/hadoop/common/*:/opt/hadoop/share/hadoop/hdfs:/opt/hadoop/share/hadoop/hdfs/lib/*:/opt/hadoop/share/hadoop/hdfs/*:/opt/ozonefs/hadoop-ozone-filesystem.jar
      initContainers:
      - name: ozonefscopy
        image: flokkr/ozone
        command:
        - bash
        - -c
        - cp share/ozone/lib/hadoop-ozone-filesystem-hadoop3-*.jar /opt/ozonefs/hadoop-ozone-filesystem.jar
        volumeMounts:
        - name: ozonefs
          mountPath: /opt/ozonefs
      volumes:
      - name: ozonefs
        emptyDir: {}
