Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0bu/cloudflare-ddns
Helm Chart for Cloudflare DDNS update with UniFi Controller
https://github.com/0bu/cloudflare-ddns
cloudflare encrypted-secrets helm helm-charts k8s unifi
Last synced: 6 days ago
JSON representation
Helm Chart for Cloudflare DDNS update with UniFi Controller
- Host: GitHub
- URL: https://github.com/0bu/cloudflare-ddns
- Owner: 0Bu
- Created: 2024-01-28T11:30:35.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-06-06T10:44:33.000Z (5 months ago)
- Last Synced: 2024-10-17T03:11:01.429Z (21 days ago)
- Topics: cloudflare, encrypted-secrets, helm, helm-charts, k8s, unifi
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [Cloudflare](https://cloudflare.com)
- [Cloudflare’s API](https://developers.cloudflare.com/fundamentals/api/)
- [Cloudflare API Token](https://dash.cloudflare.com/profile/api-tokens)The CronJob requests the current WAN IPv4 from the UniFi Controller. If the IP is new, the [Cloudflare DDNS](https://developers.cloudflare.com/dns/manage-dns-records/how-to/managing-dynamic-ip-addresses/) record will be updated.
## UniFi Controller:
- Create a readonly user## Cloudflare
- [Create](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/) an API token
- [Get](https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-list-dns-records) `zone_id` and `dns_record_id`
- `Optional`: test [updating DNS Record](https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-update-dns-record)## 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](https://github.com/bitnami-labs/sealed-secrets)
- `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`