apiVersion: apps/v1
kind: Deployment
metadata:
  name: aws-efs-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: aws-efs-operator
  template:
    metadata:
      labels:
        name: aws-efs-operator
    spec:
      serviceAccountName: aws-efs-operator
      containers:
        - name: aws-efs-operator
          # Replace this with the built image name
          image: REPLACE_IMAGE
          command:
          - aws-efs-operator
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              # We need to watch:
              # - The namespace we're started in, which is where the daemonset will run
              # - All the namespaces in which instances of our CR are created, which we
              #   can't predict.
              value: ""
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "aws-efs-operator"
