apiVersion: apps/v1
kind: Deployment
metadata:
  name: external-dns
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: external-dns
  template:
    metadata:
      labels:
        app: external-dns
    spec:
      serviceAccountName: external-dns
      containers:
        - name: external-dns
          image: k8s.gcr.io/external-dns/external-dns
          args:
            #- --source=service
            - --source=ingress
            #- --registry=txt
            - --provider=cloudflare
            - --cloudflare-proxied # (optional) enable the proxy feature of Cloudflare (DDOS protection, CDN...)
          env:
          #- name: CF_API_KEY
          #  value: "39dca89da6c3e92a679b84a117ba0cd93fb72"
          - name: CF_API_TOKEN
            value: "1PdGJPLfNBecTKxMbLTRRW0b3UqTq9vhd2hMFjS1"
          - name: CF_API_EMAIL
            value: "mxnxpx@gmail.com"


