apiVersion: batch/v1
kind: Job
metadata:
  name: initclientconfig
  labels:
    app: client
spec:
  template:
    spec:
      containers:
      - name: initclientconfig
        image: docker.yuuvis.org/yuuvis/helper/init-helper:latest
        imagePullPolicy: IfNotPresent
        command: ['bash', '/yuuvis/script/init.bash']
        volumeMounts:
        - mountPath: /yuuvis/data
          name: clientresources
        - mountPath: /yuuvis/script/init.bash
          name: initscript
          subPath: clientgitinit.bash
      imagePullSecrets:
      - name:  clientsecret
      volumes:
      - configMap:
          name: clientresources
        name: clientresources
      - configMap:
          name: clientinit
        name: initscript
      restartPolicy: OnFailure