#
# Copyright SecureKey Technologies Inc. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#

---
kind: Job
apiVersion: batch/v1
metadata:
  name: orb-add-followers
spec:
  template:
    spec:
      volumes:
        - name: script
          configMap:
            name: orb-add-followers-script
        - name: ca-cert
          configMap:
            name: orb-add-followers-ca-cert
      restartPolicy: Never
      initContainers:
        - name: wait
          image: busybox
          imagePullPolicy: IfNotPresent
          command: ["sh"]
          args: ["-c", "sleep 5"]
      containers:
      - name: orb-add-followers
        image: "alpine:latest"
        imagePullPolicy: IfNotPresent
        command: ["/bin/sh"]
        args: ["/opt/create_follow_activity.sh"]
        volumeMounts:
          - name: script
            mountPath: /opt
          - name: ca-cert
            mountPath: /etc/orb-add-followers/tls
