apiVersion: apps/v1
kind: Deployment
metadata:
  name: terraform-operator
  namespace: tf-system
spec:
  replicas: 1
  selector:
    matchLabels:
      name: terraform-operator
  template:
    metadata:
      labels:
        name: terraform-operator
    spec:
      serviceAccountName: terraform-operator
      containers:
        - name: terraform-operator
          # Replace this with the built image name
          image: isaaguilar/terraform-operator:v0.0.0
          command:
          - terraform-operator
          imagePullPolicy: IfNotPresent
          env:
            ## WATCH_NAMESPACE is not yet supported, leave as blank
            - name: WATCH_NAMESPACE
              value: ""
            #   valueFrom:
            #     fieldRef:
            #       fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "terraform-operator"
