apiVersion: apps/v1
kind: Deployment
metadata:
  name: external-dns
  labels:
    app.kubernetes.io/name: external-dns
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: external-dns
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        prometheus.io/port: "7979"
      labels:
        app.kubernetes.io/name: external-dns
    spec:
      serviceAccountName: external-dns
      containers:
      - name: external-dns
        image: quay.io/cybozu/external-dns:0.9.0.1
        ports:
        - containerPort: 7979
          name: metrics
          protocol: TCP
        args:
        - --help
        env:
        - name: NO_PROXY
          value: 10.0.0.0/8
        - name: HTTP_PROXY
          value: http://squid.internet-egress.svc:3128
        - name: HTTPS_PROXY
          value: http://squid.internet-egress.svc:3128
        - name: GOOGLE_APPLICATION_CREDENTIALS
          value: /etc/external-dns.secret/account.json
        volumeMounts:
        - name: external-dns-secret-volume
          mountPath: /etc/external-dns.secret/
      volumes:
      - name: external-dns-secret-volume
        secret:
          secretName: clouddns
