The CronJob requests the current WAN IPv4 from the UniFi Controller. If the IP is new, the Cloudflare DDNS record will be updated.
- Create a readonly user
- Create an API token
- Get
zone_id
anddns_record_id
Optional
: test updating DNS Record
- 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 upgrade --install cloudflare-ddns .
helm uninstall cloudflare