Skip to content

Custom nameservers#78

Merged
EdGeraghty merged 14 commits intodevelopfrom
custom-nameservers
Apr 15, 2026
Merged

Custom nameservers#78
EdGeraghty merged 14 commits intodevelopfrom
custom-nameservers

Conversation

@EdGeraghty
Copy link
Copy Markdown
Member

This pull request introduces support for configuring global DNS nameservers via the GLOBAL_NAMESERVERS environment variable, making DNS configuration more flexible and easier to customize. It also updates the configuration generation process in CI and improves documentation for these changes.

DNS Configuration Improvements:

  • Added support for specifying global nameservers using the GLOBAL_NAMESERVERS environment variable, allowing users to provide a space-separated list of IPv4/IPv6 addresses. The entrypoint script now builds a YAML flow-style sequence for the Headscale config, with permissive validation of input. Defaults are defined in scripts/defaults.sh and used if the variable is unset. (scripts/container-entrypoint.sh, scripts/defaults.sh, templates/headscale.template.yaml, README.md) [1] [2] [3] [4] [5] [6]

CI and Template Generation Enhancements:

  • Updated the GitHub Actions workflow to generate the config from the template using defaults, and improved extraction of ignored keys and config keys for comparison. Added a CI-specific defaults script for consistent config generation in automation. (.github/workflows/headscale-config-checker.yml, scripts/ci-defaults.sh) [1] [2] [3]

Documentation Updates:

  • Expanded the README.md with instructions and examples for configuring global nameservers using the new environment variable, including validation behavior and example usage.

These changes make DNS configuration more robust and user-friendly, and improve the reliability of automated config checking in CI.

@EdGeraghty EdGeraghty requested a review from Copilot April 15, 2026 17:38
@EdGeraghty EdGeraghty self-assigned this Apr 15, 2026
@EdGeraghty EdGeraghty added the enhancement New feature or request label Apr 15, 2026
@github-actions

This comment was marked as resolved.

@github-actions

This comment was marked as resolved.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for configuring Headscale’s global DNS nameservers via a new GLOBAL_NAMESERVERS environment variable, and updates CI config generation/documentation to reflect template-driven configuration.

Changes:

  • Add GLOBAL_NAMESERVERS parsing in the container entrypoint and inject it into the Headscale config template via $GLOBAL_NAMESERVERS_YAML.
  • Introduce default global nameservers in scripts/defaults.sh.
  • Update the config-checking GitHub Actions workflow to render a generated config from the template during comparison, plus add CI defaults and README guidance.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
templates/headscale.template.yaml Replaces static dns.nameservers.global list with $GLOBAL_NAMESERVERS_YAML for template-driven injection.
scripts/defaults.sh Defines default global nameservers (as a bash array) for runtime use.
scripts/container-entrypoint.sh Builds a YAML flow sequence from GLOBAL_NAMESERVERS (or defaults) and exports it for envsubst.
scripts/ci-defaults.sh Adds CI-specific exported defaults for template rendering in workflows.
README.md Documents GLOBAL_NAMESERVERS usage and validation behaviour.
.github/workflows/headscale-config-checker.yml Generates a rendered config from the template before comparing config keys with upstream.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/container-entrypoint.sh
Comment thread README.md Outdated
Comment thread templates/headscale.template.yaml Outdated
Copy link
Copy Markdown

Copilot AI commented Apr 15, 2026

@EdGeraghty I've opened a new pull request, #79, to work on those changes. Once the pull request is ready, I'll request review from you.

@github-actions

This comment was marked as outdated.

Copilot AI and others added 3 commits April 15, 2026 18:00
@github-actions

This comment was marked as resolved.

1 similar comment
@github-actions

This comment was marked as resolved.

Also ignore line items in config drift testing
@EdGeraghty EdGeraghty merged commit 34bf317 into develop Apr 15, 2026
7 checks passed
@EdGeraghty EdGeraghty deleted the custom-nameservers branch April 15, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants