Skip to content

Make ephemeral_node_inactivity_timeout a var#67

Merged
EdGeraghty merged 3 commits intodevelopfrom
ephemeral-node-timeout
Dec 12, 2025
Merged

Make ephemeral_node_inactivity_timeout a var#67
EdGeraghty merged 3 commits intodevelopfrom
ephemeral-node-timeout

Conversation

@EdGeraghty
Copy link
Member

Keep a default of 30m, allow changes through an environment var
This pull request introduces support for configuring the ephemeral node inactivity timeout via an environment variable, improving flexibility and consistency in the container setup. The changes ensure that the timeout value can be set using EPHEMERAL_NODE_INACTIVITY_TIMEOUT, with a sensible default and visibility in configuration summaries.

Ephemeral Node Inactivity Timeout Configuration:

  • Added a default value for headscale_ephemeral_node_inactivity_timeout_default ("30m") in scripts/defaults.sh to ensure a baseline timeout is set if not provided.
  • Updated the check_headscale_environment_vars function in scripts/container-entrypoint.sh to check or set the EPHEMERAL_NODE_INACTIVITY_TIMEOUT environment variable.
  • Included EPHEMERAL_NODE_INACTIVITY_TIMEOUT in the list of template variables exported for configuration generation in scripts/container-entrypoint.sh.
  • Modified the configuration template (templates/headscale.template.yaml) to use the EPHEMERAL_NODE_INACTIVITY_TIMEOUT environment variable for the ephemeral_node_inactivity_timeout setting.

Configuration Visibility:

  • Enhanced the configuration summary output to display the value of EPHEMERAL_NODE_INACTIVITY_TIMEOUT for easier verification and debugging.

Keep a default of 30m, allow changes through an environment var
@EdGeraghty EdGeraghty requested a review from Copilot December 12, 2025 11:26
@EdGeraghty EdGeraghty self-assigned this Dec 12, 2025
@EdGeraghty EdGeraghty added the enhancement New feature or request label Dec 12, 2025
@github-actions
Copy link

🆕 New Headscale Config Options

+ v4
+ v6```

Copy link

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

This pull request makes the ephemeral node inactivity timeout configurable through an environment variable whilst maintaining backward compatibility with a 30-minute default. The change enables runtime configuration of the timeout without modifying template files.

  • Added EPHEMERAL_NODE_INACTIVITY_TIMEOUT environment variable support with a default value
  • Integrated the new variable into the configuration pipeline and display summary
  • Updated the Headscale template to use the environment variable for timeout configuration

Reviewed changes

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

File Description
templates/headscale.template.yaml Replaced hardcoded 30m timeout with environment variable substitution
scripts/defaults.sh Added default value definition for the timeout (30m) following project naming conventions
scripts/container-entrypoint.sh Added environment variable validation, export handling, and configuration summary display

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions

This comment was marked as duplicate.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

🆕 New Headscale Config Options

+ v4
+ v6```

@EdGeraghty EdGeraghty merged commit 36566bc into develop Dec 12, 2025
7 checks passed
@EdGeraghty EdGeraghty deleted the ephemeral-node-timeout branch December 12, 2025 11:35
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.

2 participants