apiVersion: batch/v1
kind: Job
metadata:
  name: randomtest
  namespace: testbus
  labels:
    app: randomtest
spec:
  template:
    metadata:
      labels:
        app: randomtest
    spec:
      containers:
        - name: testbus
          image: jieshe/testbus:latest
          imagePullPolicy: Always
          command: ["testbus"]
          args: [
            "random",
            "--conn-str=$(SERVICEBUS_CONNECTION_STRING)"
          ]
          env:
            - name: SERVICEBUS_CONNECTION_STRING
              valueFrom:
                secretKeyRef:
                  name: testbus-secret
                  key: connStr
      restartPolicy: Never
  backoffLimit: 1
