0Bu / cloudflare-ddns

Helm Chart for Cloudflare DDNS update with UniFi Controller

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The CronJob requests the current WAN IPv4 from the UniFi Controller. If the IP is new, the Cloudflare DDNS record will be updated.

UniFi Controller:

  • Create a readonly user

Cloudflare

env.txt

  • Create the env.txt file e.g.
    • UNIFI_URL=https://unifi
      UNIFI_USER=user
      UNIFI_PASS=read:only
      ZONE_ID=023e105f4ecef8ad9ca31a8372d0c353       <= 32 characters
      DNS_RECORD_ID=023e105f4ecef8ad9ca31a8372d0c353 <= 32 characters
      TOKEN=023e105f4ecef8ad9ca31a8372d0c353
      DOMAIN=my.domain.com
      
  • Create the sealed secret
    • kubectl create secret generic cloudflare-ddns --dry-run=client --from-env-file=env.txt -oyaml | kubeseal --controller-name sealed-secrets -oyaml > templates/sealed-secret.yaml

Helm install/upgrade

helm upgrade --install cloudflare-ddns .

Helm unintall

helm uninstall cloudflare

About

Helm Chart for Cloudflare DDNS update with UniFi Controller