---
apiVersion: batch/v1
kind: Job
metadata:
  name: "saltransform-init"
spec:
  template:
    metadata:
      labels:
        role: "saltransform-init"
      # annotations:
      #   prometheus.io/scrape: "true"
      #   prometheus.io/port: "9092"
    spec:
      containers:
      - name: saltransformer
        image: lsstsqre/kafka-efd-demo:latest
        imagePullPolicy: Always
        command:
          - "kafkaefd"
          - "saltransform"
          - "init"
          - "--subsystem"
          - "MTM1M3TS"
          - "--subsystem"
          - "MTM1M3"
        env:
          - name: GITHUB_USER
            valueFrom:
              secretKeyRef:
                name: saltransformer-secrets
                key: GITHUB_USER
          - name: GITHUB_TOKEN
            valueFrom:
              secretKeyRef:
                name: saltransformer-secrets
                key: GITHUB_TOKEN
        envFrom:
        - configMapRef:
            name: saltransform
      restartPolicy: Never
  backoffLimit: 4
