apiVersion: apps/v1
kind: Deployment
metadata:
  name: external-dns
  namespace: external-dns
  labels:
    app.kubernetes.io/name: external-dns
    app.kubernetes.io/part-of: external-dns
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/name: external-dns
      app.kubernetes.io/part-of: external-dns
  template:
    metadata:
      labels:
        app.kubernetes.io/name: external-dns
        app.kubernetes.io/part-of: external-dns
    spec:
      serviceAccountName: external-dns
      containers:
      - name: external-dns
        image: registry.opensource.zalan.do/teapot/external-dns:latest
        args:
        - --source=ingress
        - --source=service
        - --domain-filter=pulsifer.dev
        - --domain-filter=home.pulsifer.ca
        - --domain-filter=wishin.app
        - --provider=google
        - --google-project=homelab-ng
        - --registry=txt
        - --txt-owner-id=k8s
        securityContext:
          runAsUser: 65534
        env:
        - name: GOOGLE_APPLICATION_CREDENTIALS
          value: /var/run/secrets/gcp/credentials.json
        volumeMounts:
        - name: gcp-service-account
          mountPath: /var/run/secrets/gcp
          readOnly: true
      volumes:
      - name: gcp-service-account
        secret:
          secretName: gcp-service-account
