apiVersion: apps/v1
kind: Deployment
metadata:
  name: cluster-configurator
  namespace: openshift-rbo-configurator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: cluster-configurator
  template:
    metadata:
      labels:
        name: cluster-configurator
    spec:
      serviceAccountName: cluster-configurator
      containers:
        - name: ansible
          command:
          - /usr/local/bin/ao-logs
          - /tmp/ansible-operator/runner
          - stdout
          image: "quay.io/rbo/cluster-configurator:latest"
          imagePullPolicy: "Always"
          volumeMounts:
          - mountPath: /tmp/ansible-operator/runner
            name: runner
            readOnly: true
        - name: operator
          image: "quay.io/rbo/cluster-configurator:latest"
          imagePullPolicy: "Always"
          volumeMounts:
          - mountPath: /tmp/ansible-operator/runner
            name: runner
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "cluster-configurator"
      volumes:
        - name: runner
          emptyDir: {}
