---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: sanity-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: sanity-operator
  template:
    metadata:
      labels:
        name: sanity-operator
    spec:
      serviceAccountName: sanity-operator
      containers:
        - name: sanity-operator
          # Replace this with the built image name
          image: quay.io/ypery/sanity-operator:v1.0
          imagePullPolicy: "Always"
          volumeMounts:
          - mountPath: /tmp/ansible-operator/runner
            name: runner
            readOnly: true
        - name: operator
          image: quay.io/ypery/sanity-operator:v1.0
          imagePullPolicy: Always
          volumeMounts:
          - mountPath: /tmp/ansible-operator/runner
            name: runner
          env:
            - name: WATCH_NAMESPACE
              value: ""
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "userquota-operator"
      volumes:
        - name: runner
          emptyDir: {}
