Files
netbird-kubernetes-operator/pkg/applyconfigurations/api/v1alpha1/networkrouterstatus.go
T
Philip LaineandGitHub 6768a76c9c 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>
2026-04-23 08:55:49 +02:00

66 lines
3.0 KiB
Go

// Code generated by controller-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// NetworkRouterStatusApplyConfiguration represents a declarative configuration of the NetworkRouterStatus type for use
// with apply.
//
// NetworkRouterStatus defines the observed state of NetworkRouter.
type NetworkRouterStatusApplyConfiguration struct {
// ObservedGeneration is the last reconciled generation.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
// Conditions holds the conditions for the NetworkRouter.
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
// RoutingPeerID is the id of the created routing peer.
RoutingPeerID *string `json:"routingPeerID,omitempty"`
// NetworkID is the id of the network the routing peer was created in.
NetworkID *string `json:"networkID,omitempty"`
}
// NetworkRouterStatusApplyConfiguration constructs a declarative configuration of the NetworkRouterStatus type for use with
// apply.
func NetworkRouterStatus() *NetworkRouterStatusApplyConfiguration {
return &NetworkRouterStatusApplyConfiguration{}
}
// WithObservedGeneration sets the ObservedGeneration 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 ObservedGeneration field is set to the value of the last call.
func (b *NetworkRouterStatusApplyConfiguration) WithObservedGeneration(value int64) *NetworkRouterStatusApplyConfiguration {
b.ObservedGeneration = &value
return b
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *NetworkRouterStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *NetworkRouterStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
}
b.Conditions = append(b.Conditions, *values[i])
}
return b
}
// WithRoutingPeerID sets the RoutingPeerID 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 RoutingPeerID field is set to the value of the last call.
func (b *NetworkRouterStatusApplyConfiguration) WithRoutingPeerID(value string) *NetworkRouterStatusApplyConfiguration {
b.RoutingPeerID = &value
return b
}
// WithNetworkID sets the NetworkID 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 NetworkID field is set to the value of the last call.
func (b *NetworkRouterStatusApplyConfiguration) WithNetworkID(value string) *NetworkRouterStatusApplyConfiguration {
b.NetworkID = &value
return b
}