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:
      containers:
      - name: external-dns
        image: k8s.gcr.io/external-dns/external-dns:v0.8.0
        args:
        - --source=service
        - --source=ingress
        # - --domain-filter=rhododevdron.dk # (optional) limit to only example.com domains; change to match the zone created above.
        - --provider=azure
        - --azure-resource-group=itu-minitwit-rg # (optional) use the DNS zones from the tutorial's resource group
        volumeMounts:
        - name: external-dns-config-file
          mountPath: /etc/kubernetes
          readOnly: true
      volumes:
      - name: external-dns-config-file
        secret:
          secretName: external-dns-config-file
          items:
          - key: external-dns-secret.json
            path: azure.json 