apiVersion: apps/v1
kind: Deployment
metadata:
  name: openldap-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: openldap-operator
  template:
    metadata:
      labels:
        name: openldap-operator
    spec:
      serviceAccountName: openldap-operator
      containers:
        - name: openldap-operator
          # Replace this with the built image name
          image: quay.io/pdmack/openldap-operator:v0.0.1
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "openldap-operator"
