apiVersion: apps/v1
kind: Deployment
metadata:
  name: externalsecret-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: externalsecret-operator
  template:
    metadata:
      labels:
        name: externalsecret-operator
    spec:
      serviceAccountName: externalsecret-operator
      containers:
        - name: externalsecret-operator
          image: containersol/externalsecret-operator:${DOCKER_TAG}
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              value: ""
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: ${OPERATOR_NAME}
            - name: OPERATOR_CONFIG
              valueFrom:
                secretKeyRef:
                  name: externalsecret-operator-config
                  key: operator-config.json
