apiVersion: batch/v1
kind: Job
metadata:
  name: job-wq-2
  namespace: sta-builder-be
spec:
  parallelism: 3
  completions: 3
  ttlSecondsAfterFinished: 10
  template:
    metadata:
      name: job-wq-2
      annotations:
        sidecar.istio.io/inject: 'false'
    spec:
      containers:
        - name: render-engine-be
          image: docker.adaoncloud.com/ada/sta-render-engine:test
          env:
            - name: ADA_APP_ENV
              value: sta-
            - name: ADA_POD_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: ELASTIC_HOST
              value: 'https://ada-elastic-es-http.sta-ada-elastic.svc.cluster.local:9200'
            - name: ELASTIC_REJECTUNAUTHORIZED
              value: 'true'
            - name: ELASTIC_USERNAME
              valueFrom:
                secretKeyRef:
                  name: tdb-logs-es-user-rw
                  key: username
                  optional: false
            - name: ELASTIC_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: tdb-logs-es-user-rw
                  key: password
                  optional: false
            - name: KAFKA_SERVER
              value: 'ada-cluster-kafka-bootstrap.sta-ada-kafka-cluster.svc.cluster.local:9093'
            - name: KAFKA_USERNAME
              valueFrom:
                secretKeyRef:
                  name: kafka-render-engine-user
                  key: username
                  optional: false
            - name: KAFKA_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: kafka-render-engine-user
                  key: password
                  optional: false
            - name: KAFKA_CLIENTID
              valueFrom:
                secretKeyRef:
                  name: kafka-render-engine-user
                  key: clientid
                  optional: false
            - name: KAFKA_TOPIC
              valueFrom:
                secretKeyRef:
                  name: kafka-render-engine-user
                  key: topic
                  optional: false
            - name: KAFKA_GROUPID
              valueFrom:
                secretKeyRef:
                  name: kafka-render-engine-user
                  key: groupid
                  optional: false
            - name: FSTLOGLEVEL
              value: info
            - name: NODE_ENV
              value: sta
          ports:
            - containerPort: 80
          imagePullPolicy: Always
      restartPolicy: OnFailure
      imagePullSecrets:
        - name: ada-registry
