apiVersion: apps/v1
kind: Deployment
metadata:
  name: external-dns
  namespace: kube-system
  labels:
    application: external-dns
    version: v0.5.8
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      application: external-dns
  template:
    metadata:
      labels:
        application: external-dns
        version: v0.5.8
      annotations:
        iam.amazonaws.com/role: "{{ .LocalID }}-app-external-dns"
    spec:
      priorityClassName: system-cluster-critical
      containers:
      - name: external-dns
        image: registry.opensource.zalan.do/teapot/external-dns:v0.5.8
        args:
        - --source=service
        - --source=ingress
        - --provider=aws
        - --registry=txt
        - --txt-owner-id={{ .Region }}:{{ .LocalID }}
        resources:
          limits:
            memory: 100Mi
          requests:
            cpu: 25m
            memory: 100Mi
        securityContext:
          readOnlyRootFilesystem: true
          runAsNonRoot: true
          runAsUser: 1000
          capabilities:
            drop: ["ALL"]
