WIP: add cron job to download extra dns json file #5

Draft
ammaratef45 wants to merge 1 commits from dns_extra_records into main
Owner

Currently testing this, if someone interested in helping with test and/or review that would be appreciated

Currently testing this, if someone interested in helping with test and/or review that would be appreciated
ammaratef45 added 1 commit 2026-04-07 11:19:28 +00:00
decentral1se requested review from 3wordchant 2026-04-08 21:46:40 +00:00
3wordchant approved these changes 2026-04-09 17:09:35 +00:00
3wordchant left a comment
Owner

Awesome, thank you @ammaratef45 ! 🙏If you've tested a non-compose.dns.yml deployment and it works, I say go ahead and merge. Otherwise I will try to test it myself ASAP.

Awesome, thank you @ammaratef45 ! 🙏If you've tested a non-`compose.dns.yml` deployment and it works, I say go ahead and merge. Otherwise I will try to test it myself ASAP.
@ -0,0 +12,4 @@
mode: replicated
replicas: 0
labels:
- "swarm.cronjob.enable=true"
Owner

Love it! For a million bonus points, it might be nice to add a fallback built-in cron option for folks who don't have / don't want a swarm-cronjob app? Highly optional though IMO.

Love it! For a million bonus points, it might be nice to add a fallback built-in cron option for folks who don't have / don't want a `swarm-cronjob` app? Highly optional though IMO.
@ -319,3 +319,3 @@
# Alternatively, extra DNS records can be loaded from a JSON file.
# Headscale processes this file on each change.
# extra_records_path: /var/lib/headscale/extra-records.json
extra_records_path: /var/lib/headscale/extra-records.json
Owner

Will this cause any problems for deployments not using compose.dns.yml? I wonder about putting this inside an {{ if ?

Will this cause any problems for deployments not using `compose.dns.yml`? I wonder about putting this inside an `{{ if `?
@ -0,0 +1,6 @@
apk add --no-cache --quiet wget
Owner

Could also inline this whole file as the entrypoint, given it's so short? No big deal either way though.

Could also inline this whole file as the `entrypoint`, given it's so short? No big deal either way though.
@ -0,0 +1 @@
[]
Owner

Could cheekily inline this into compose.dns.yml maybe? https://stackoverflow.com/a/77561067/14269772

Could cheekily inline this into `compose.dns.yml` maybe? https://stackoverflow.com/a/77561067/14269772
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin dns_extra_records:dns_extra_records
git checkout dns_extra_records
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coop-cloud/headscale#5
No description provided.