Set best practice defaults for network router deployment (#214)

This change sets some Kubernetes best practices as defaults. Such as
topology spread and pod disruption budget.

It also exposes log level and image settings in the root struct to make
it easier to override commonly configured settings.

Fixes #77 
Fixes #162

Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
Philip Laine
2026-04-28 15:18:15 +02:00
committed by GitHub
parent a94071224b
commit 37d48b5ca8
5 changed files with 115 additions and 10 deletions
@@ -9,6 +9,10 @@ package v1alpha1
type NetworkRouterSpecApplyConfiguration struct {
// DNSZoneRef is a reference to the DNS zone used to create records for resources.
DNSZoneRef *DNSZoneReferenceApplyConfiguration `json:"dnsZoneRef,omitempty"`
// Netbird client image.
Image *string `json:"image,omitempty"`
// Log level for Netbird client.
LogLevel *string `json:"logLevel,omitempty"`
// WorkloadOverride contains configuration that will override the default workload.
WorkloadOverride *WorkloadOverrideApplyConfiguration `json:"workloadOverride,omitempty"`
}
@@ -27,6 +31,22 @@ func (b *NetworkRouterSpecApplyConfiguration) WithDNSZoneRef(value *DNSZoneRefer
return b
}
// WithImage sets the Image 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 Image field is set to the value of the last call.
func (b *NetworkRouterSpecApplyConfiguration) WithImage(value string) *NetworkRouterSpecApplyConfiguration {
b.Image = &value
return b
}
// WithLogLevel sets the LogLevel 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 LogLevel field is set to the value of the last call.
func (b *NetworkRouterSpecApplyConfiguration) WithLogLevel(value string) *NetworkRouterSpecApplyConfiguration {
b.LogLevel = &value
return b
}
// WithWorkloadOverride sets the WorkloadOverride 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 WorkloadOverride field is set to the value of the last call.