apiVersion: batch/v1
kind: Job
metadata:
  generateName: k8-gopherciser
spec:
  template:
    metadata:
      annotations:
        prometheus.io/port: "9090"
        prometheus.io/scrape: "true"
      labels:
        app: k8-gopherciser
    spec:
      containers:
        - name: k8-gopherciser
          image: qlik/gopherciser:latest
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 9090
          volumeMounts:
            - name: config-volume
              mountPath: /etc/config-volume
            - name: key-volume
              mountPath: /etc/keyfiles
              readOnly: true
      restartPolicy: Never
      imagePullSecrets:
         - name: docker-registry-secret
      volumes:
         - name: config-volume
           configMap:
             name: testconfig
         - name: key-volume
           secret:
             secretName: gopherciser
  backoffLimit: 4
