Add network router and resource (#189)

This change adds two new resources, NetworkRouter and NetworkResource,
which enable clusters to expose Kubernetes services to Netbird.

The NetworkRouter is responsible for creating the network, group, setup
key and routing peer all of which are unique to the isntance. Along with
the deployment of the client in the cluster.

The NetworkResource exposes a service by linking to the specific router
it wants to expose to. This makes coupling between the resource and
network easy to understand.

Routers also set a DNS zone which is used to give names to resources
based on the name and namespace of the service being exposed.

Part of #172

Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
Philip Laine
2026-04-23 08:55:49 +02:00
committed by GitHub
parent af11e31b28
commit 6768a76c9c
38 changed files with 2973 additions and 55 deletions
@@ -0,0 +1,34 @@
// Code generated by controller-gen. DO NOT EDIT.
package v1alpha1
// CrossNamespaceReferenceApplyConfiguration represents a declarative configuration of the CrossNamespaceReference type for use
// with apply.
type CrossNamespaceReferenceApplyConfiguration struct {
// Name of the referent.
Name *string `json:"name,omitempty"`
// Namespace of the referent.
Namespace *string `json:"namespace,omitempty"`
}
// CrossNamespaceReferenceApplyConfiguration constructs a declarative configuration of the CrossNamespaceReference type for use with
// apply.
func CrossNamespaceReference() *CrossNamespaceReferenceApplyConfiguration {
return &CrossNamespaceReferenceApplyConfiguration{}
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *CrossNamespaceReferenceApplyConfiguration) WithName(value string) *CrossNamespaceReferenceApplyConfiguration {
b.Name = &value
return b
}
// WithNamespace sets the Namespace field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *CrossNamespaceReferenceApplyConfiguration) WithNamespace(value string) *CrossNamespaceReferenceApplyConfiguration {
b.Namespace = &value
return b
}