---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ansible-operator-nginx-simple
spec:
  replicas: 1
  selector:
    matchLabels:
      name: ansible-operator-nginx-simple
  template:
    metadata:
      labels:
        name: ansible-operator-nginx-simple
    spec:
      serviceAccountName: ansible-operator-nginx-simple
      containers:
        - name: ansible-operator-nginx-simple
          # Replace this with the built image name
          image: quay.io/rh_tawatana/ansible-operator-nginx-simple:v0.1.2
          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: "ansible-operator-nginx-simple"
            - name: ANSIBLE_GATHERING
              value: explicit
          livenessProbe:
            httpGet:
              path: /healthz
              port: 6789
            initialDelaySeconds: 5
            periodSeconds: 3
      volumes:
        - name: runner
          emptyDir: {}
