Merged
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
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_NAMESERVERSparsing 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.
|
@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. |
This comment was marked as outdated.
This comment was marked as outdated.
Agent-Logs-Url: https://github.com/privacyint/docker-headscale/sessions/a1109ee5-2afa-49fa-ad6b-4d3d5da3ba71 Co-authored-by: EdGeraghty <20861699+EdGeraghty@users.noreply.github.com>
Export `GLOBAL_NAMESERVERS_YAML` consistently across all return paths
This comment was marked as resolved.
This comment was marked as resolved.
1 similar comment
This comment was marked as resolved.
This comment was marked as resolved.
Also ignore line items in config drift testing
8c15f6c to
d8b2d7d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for configuring global DNS nameservers via the
GLOBAL_NAMESERVERSenvironment 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:
GLOBAL_NAMESERVERSenvironment 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 inscripts/defaults.shand 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:
.github/workflows/headscale-config-checker.yml,scripts/ci-defaults.sh) [1] [2] [3]Documentation Updates:
README.mdwith 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.