apiVersion: batch/v1
kind: Job
metadata:
  name: secret-generator-deploy
spec:
  template:
    metadata:
      name: secret-generator-deploy
      annotations:
        sidecar.istio.io/inject: "false"
    spec:
      containers:
      - name: secret-generator-deploy
        image: chrisesharp/keygen
        workingDir: "/tmp"
        command: [ "./gen-keystore.sh","127.0.0.1" ]
        volumeMounts:
        - name: keystore-pv
          mountPath: /tmp/keystore
      volumes:
      - name: keystore-pv
        persistentVolumeClaim:
          claimName: keystore-pv-claim
      restartPolicy: Never