apiVersion: v1
kind: Pod
metadata:
  name: argocd-bootstrap
  namespace: argocd
spec:
  nodeSelector:
    node-role.kubernetes.io/master: ""
  tolerations:
  - effect: NoSchedule
    key: node-role.kubernetes.io/master
    operator: Exists
  containers:
  - name: cli
    image: quay.io/openshift/origin-cli:4.7
    command:
    - "bash"
    - "-c"
    - |
      until oc apply -f /manifests
      do
        sleep 10
      done
    volumeMounts:
    - name: manifests
      mountPath: /manifests
  serviceAccount: argocd-bootstrapper
  restartPolicy: OnFailure
  volumes:
    - name: manifests
      configMap:
        name: argocd-bootstrap-manifests
