apiVersion: apps/v1
kind: Deployment
metadata:
  name: config-policy-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      name: config-policy-controller
  template:
    metadata:
      labels:
        name: config-policy-controller
    spec:
      serviceAccountName: config-policy-controller
      containers:
        - image: quay.io/open-cluster-management/config-policy-controller:latest-dev
          name: config-policy-controller
          command:
          - config-policy-controller
          args:
            - "--enable-lease=true"
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              value: managed
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "config-policy-controller"