apiVersion: batch/v1
kind: Job
metadata:
  name: baas-generator
spec:
  parallelism: 1
  completions: 1
  template:
    metadata:
      name: baas
    spec:
      containers:
        - name: baas
          image: 172.30.1.1:5000/myproject/baas:latest
          args:
            - job
            - generate
          env:
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
      serviceAccountName: baas
      restartPolicy: OnFailure
