apiVersion: apps/v1
kind: Deployment
metadata:
  name: certmerge-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: certmerge-operator
  template:
    metadata:
      labels:
        name: certmerge-operator
    spec:
      serviceAccountName: certmerge-operator
      containers:
        - name: certmerge-operator
          # Replace this with the built image name
          image: prune/certmerge-operator:latest
          ports:
          - containerPort: 60000
            name: metrics
          command:
          - certmerge-operator
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "certmerge-operator"
            - name: "LOGLEVEL"
              value: "INFO"
            - name: "LOGJSON"
              value: "true"