apiVersion: apps/v1
kind: Deployment
metadata:
  name: eunomia-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: eunomia-operator
  template:
    metadata:
      labels:
        name: eunomia-operator
    spec:
      serviceAccountName: eunomia-operator
      containers:
        - name: eunomia-operator
          # Replace this with the built image name
          image: quay.io/kohlstechnology/eunomia-operator:v0.0.1
          command:
          - eunomia-operator
          imagePullPolicy: Always
          env:
            - name: JOB_TEMPLATE
              value: /templates/job.yaml
            - name: CRONJOB_TEMPLATE
              value: /templates/cronjob.yaml
            - name: WATCH_NAMESPACE
              value: ""
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "eunomia-operator"
          volumeMounts:
          - name: template-volume
            mountPath: /templates
      volumes:
        - name: template-volume
          configMap:
            name: eunomia-templates
