[PR #103] [MERGED] Add support for sharing nodes across namespaces #1259

Closed
opened 2025-12-29 02:29:29 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/103
Author: @juanfont
Created: 9/3/2021
Status: Merged
Merged: 9/11/2021
Merged by: @juanfont

Base: mainHead: shared-nodes


📝 Commits (10+)

  • 1ecd0d7 Added DB SharedNode model to support sharing nodes
  • 48b73fa Implement node sharing functionality
  • 7010f5a Added unit tests on sharing nodes
  • 187b016 Added helper function to get list of shared nodes
  • 4ba107a README updated
  • d86de68 Show namespace in node list table
  • 7287e02 Minor linting issues
  • 7ce4738 Preload namespace so the name can be shown
  • 7edd0cd Added add node cli
  • 729cd54 Renamed sharing function

📊 Changes

11 files changed (+576 additions, -42 deletions)

View changed files

📝 .github/workflows/lint.yml (+3 -1)
📝 README.md (+1 -3)
📝 api.go (+1 -4)
📝 cmd/headscale/cli/nodes.go (+89 -10)
📝 db.go (+5 -0)
📝 machine.go (+54 -21)
📝 namespaces.go (+23 -1)
📝 poll.go (+2 -2)
📝 routes.go (+2 -0)
sharing.go (+37 -0)
sharing_test.go (+359 -0)

📄 Description

This PR adds support for sharing nodes among namespaces - essentially implementing this https://tailscale.com/kb/1084/sharing/

Nodes from a given namespace can be 'shared' (thus becoming a peer) to another namespace. Routes are not shared, to replicate Tailscale.com behaviour.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/103 **Author:** [@juanfont](https://github.com/juanfont) **Created:** 9/3/2021 **Status:** ✅ Merged **Merged:** 9/11/2021 **Merged by:** [@juanfont](https://github.com/juanfont) **Base:** `main` ← **Head:** `shared-nodes` --- ### 📝 Commits (10+) - [`1ecd0d7`](https://github.com/juanfont/headscale/commit/1ecd0d7ca4a9ef453ec3f2a67349f954b8c47d54) Added DB SharedNode model to support sharing nodes - [`48b73fa`](https://github.com/juanfont/headscale/commit/48b73fa12fe69a2c1cd7a58ca32821946b049164) Implement node sharing functionality - [`7010f5a`](https://github.com/juanfont/headscale/commit/7010f5afad50a161597d6a8453a7dc3eede0540b) Added unit tests on sharing nodes - [`187b016`](https://github.com/juanfont/headscale/commit/187b016d099257ec3d6c10604703ef375b8b500a) Added helper function to get list of shared nodes - [`4ba107a`](https://github.com/juanfont/headscale/commit/4ba107a765d9a3cbec404834684db0c0bf1b9468) README updated - [`d86de68`](https://github.com/juanfont/headscale/commit/d86de68b409131ec5c77b7f8d0865cffb66d5ed1) Show namespace in node list table - [`7287e02`](https://github.com/juanfont/headscale/commit/7287e0259ccad80cd4a5026245a445ed1a2e5380) Minor linting issues - [`7ce4738`](https://github.com/juanfont/headscale/commit/7ce4738d8a2f0a9233f15f3f300cbc190e48c2e5) Preload namespace so the name can be shown - [`7edd0cd`](https://github.com/juanfont/headscale/commit/7edd0cd14cd7f7e0b66a221467f70e0dde14b1f4) Added add node cli - [`729cd54`](https://github.com/juanfont/headscale/commit/729cd54401dc122cb19b72eb868f9eee98dd999c) Renamed sharing function ### 📊 Changes **11 files changed** (+576 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/lint.yml` (+3 -1) 📝 `README.md` (+1 -3) 📝 `api.go` (+1 -4) 📝 `cmd/headscale/cli/nodes.go` (+89 -10) 📝 `db.go` (+5 -0) 📝 `machine.go` (+54 -21) 📝 `namespaces.go` (+23 -1) 📝 `poll.go` (+2 -2) 📝 `routes.go` (+2 -0) ➕ `sharing.go` (+37 -0) ➕ `sharing_test.go` (+359 -0) </details> ### 📄 Description This PR adds support for sharing nodes among namespaces - essentially implementing this https://tailscale.com/kb/1084/sharing/ Nodes from a given namespace can be 'shared' (thus becoming a peer) to another namespace. Routes are not shared, to replicate Tailscale.com behaviour. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 02:29:29 +01:00
adam closed this issue 2025-12-29 02:29:29 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1259