apiVersion: apps/v1
kind: Deployment
metadata:
  name:  external-dns
  namespace: clase11
  labels:
    app:  external-dns
spec:
  selector:
    matchLabels:
      app: external-dns
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app:  external-dns
      annotations:
        # actualizar este campo con el valor obtenido luego
        # de crear el role con eksctl
        iam.amazonaws.com/role: arn:aws:iam::XXXXXXXXX:role/eksctl-aws101-add....
    spec:
      containers:
      - name:  external-dns
        image:  k8s.gcr.io/external-dns/external-dns:v0.9.0
        args:
        - --source=service
        - --source=ingress
        - --domain-filter=aws101.org
        - --provider=aws
        # - --policy=upsert-only
        - --aws-zone-type=public
        - --registry=txt
        - --txt-owner-id=my-hostedzone-identifier
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
          limits:
            cpu: 100m
            memory: 100Mi
      serviceAccount: external-dns
      securityContext:
        fsGroup: 65534
