--- apiVersion: batch/v1 kind: Job metadata: name: diwt-job labels: jobgroup: jobz-pls spec: template: metadata: name: kubejob labels: jobgroup: jobs-pls spec: containers: - name: diwtcontainer image: git.dotya.ml/wanderer/diwt:testing # MATRIX cm has been created with: # kubectl create configmap --from-file=resources/matrix.txt # # since runnign the jobs with matrix provided on stdin still fails # with alpine's 'sh' in the container, there are two options: # * use a mount # * use bash/zsh command: ["sh", "-c"] args: # run both with env var and with matrix provided via file mount. - apk add --no-cache bash && bash -c "diwt -a '$MATRIX'"; sh -c "diwt -m /matrix/matrix.txt"; volumeMounts: - name: matrix mountPath: /matrix env: - name: MATRIX valueFrom: configMapKeyRef: name: matrix.txt key: matrix.txt volumes: - name: matrix configMap: name: matrix.txt restartPolicy: OnFailure ...