[PR #5814] [MERGED] [management] allow local routing peer resource #26830

Closed
opened 2026-08-05 07:07:51 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/5814
Author: @pascal-fischer
Created: 4/7/2026
Status: Merged
Merged: 4/10/2026
Merged by: @pascal-fischer

Base: mainHead: feature/allow-local-routing-peer-resource


📝 Commits (10+)

  • c5d8b4a add flag to mark a resource on the routing peer
  • 196ad68 use resource IP
  • 1d1a411 use in and out rules
  • 5ab759d use source peer
  • 08410eb optimize
  • f741777 update get network resource query
  • 54a03d7 use validated peers only
  • 5483a7c removed unused getRoutingPeers method
  • 7b0ef86 drop looping through posture peers
  • 4c3cdfa Merge branch 'main' into feature/allow-local-routing-peer-resource

📊 Changes

7 files changed (+134 additions, -50 deletions)

View changed files

📝 management/server/networks/resources/manager.go (+1 -1)
📝 management/server/networks/resources/types/resource.go (+48 -41)
📝 management/server/store/sql_store.go (+6 -2)
📝 management/server/store/sql_store_test.go (+1 -1)
📝 management/server/types/networkmap_components.go (+65 -5)
📝 shared/management/http/api/openapi.yml (+4 -0)
📝 shared/management/http/api/types.gen.go (+9 -0)

📄 Description

Describe your changes

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • New Features
    • API accepts an optional "on_routing_peer" flag for network resources; it's persisted and returned in responses.
    • Router deployments now generate local inbound firewall rules for resources marked as routing-peer, improving routing and access control.
  • Tests
    • Unit test updated to reflect the new routing-peer behavior during resource creation.

🔄 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/netbirdio/netbird/pull/5814 **Author:** [@pascal-fischer](https://github.com/pascal-fischer) **Created:** 4/7/2026 **Status:** ✅ Merged **Merged:** 4/10/2026 **Merged by:** [@pascal-fischer](https://github.com/pascal-fischer) **Base:** `main` ← **Head:** `feature/allow-local-routing-peer-resource` --- ### 📝 Commits (10+) - [`c5d8b4a`](https://github.com/netbirdio/netbird/commit/c5d8b4adf43f98d64753b24ae896f4eec1e64084) add flag to mark a resource on the routing peer - [`196ad68`](https://github.com/netbirdio/netbird/commit/196ad6838d6c4c176113649acacada64886ffd30) use resource IP - [`1d1a411`](https://github.com/netbirdio/netbird/commit/1d1a41168d48309a51dc4d432272b8f2603818a1) use in and out rules - [`5ab759d`](https://github.com/netbirdio/netbird/commit/5ab759d46709660e0b9b017d2a9fb5742191f12b) use source peer - [`08410eb`](https://github.com/netbirdio/netbird/commit/08410eb1a42c33401675857478906bd555fc65b3) optimize - [`f741777`](https://github.com/netbirdio/netbird/commit/f741777f8bd7ba153c67746dcafa6e5f110144d9) update get network resource query - [`54a03d7`](https://github.com/netbirdio/netbird/commit/54a03d7cb2b7a35805d3d7ddc5d21f336bebe665) use validated peers only - [`5483a7c`](https://github.com/netbirdio/netbird/commit/5483a7c54d1cd59de1289b9a39d8fcfc920e28f4) removed unused getRoutingPeers method - [`7b0ef86`](https://github.com/netbirdio/netbird/commit/7b0ef86593136fd3587412458d9b0ca1b7d16091) drop looping through posture peers - [`4c3cdfa`](https://github.com/netbirdio/netbird/commit/4c3cdfa33687749ac8dd9c4ec5499f5503751416) Merge branch 'main' into feature/allow-local-routing-peer-resource ### 📊 Changes **7 files changed** (+134 additions, -50 deletions) <details> <summary>View changed files</summary> 📝 `management/server/networks/resources/manager.go` (+1 -1) 📝 `management/server/networks/resources/types/resource.go` (+48 -41) 📝 `management/server/store/sql_store.go` (+6 -2) 📝 `management/server/store/sql_store_test.go` (+1 -1) 📝 `management/server/types/networkmap_components.go` (+65 -5) 📝 `shared/management/http/api/openapi.yml` (+4 -0) 📝 `shared/management/http/api/types.gen.go` (+9 -0) </details> ### 📄 Description ## Describe your changes ## Issue ticket number and link ## Stack <!-- branch-stack --> ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * API accepts an optional "on_routing_peer" flag for network resources; it's persisted and returned in responses. * Router deployments now generate local inbound firewall rules for resources marked as routing-peer, improving routing and access control. * **Tests** * Unit test updated to reflect the new routing-peer behavior during resource creation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 07:07:51 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#26830