mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 10:49:15 +00:00
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>
59 lines
2.8 KiB
Go
59 lines
2.8 KiB
Go
// Code generated by controller-gen. DO NOT EDIT.
|
|
|
|
package applyconfigurations
|
|
|
|
import (
|
|
v1alpha1 "github.com/netbirdio/kubernetes-operator/api/v1alpha1"
|
|
apiv1alpha1 "github.com/netbirdio/kubernetes-operator/pkg/applyconfigurations/api/v1alpha1"
|
|
internal "github.com/netbirdio/kubernetes-operator/pkg/applyconfigurations/internal"
|
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
|
)
|
|
|
|
// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no
|
|
// apply configuration type exists for the given GroupVersionKind.
|
|
func ForKind(kind schema.GroupVersionKind) interface{} {
|
|
switch kind {
|
|
// Group=netbird.io, Version=v1alpha1
|
|
case v1alpha1.SchemeGroupVersion.WithKind("CrossNamespaceReference"):
|
|
return &apiv1alpha1.CrossNamespaceReferenceApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("DNSZoneReference"):
|
|
return &apiv1alpha1.DNSZoneReferenceApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("Group"):
|
|
return &apiv1alpha1.GroupApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("GroupSpec"):
|
|
return &apiv1alpha1.GroupSpecApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("GroupStatus"):
|
|
return &apiv1alpha1.GroupStatusApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("NetworkResource"):
|
|
return &apiv1alpha1.NetworkResourceApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("NetworkResourceSpec"):
|
|
return &apiv1alpha1.NetworkResourceSpecApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("NetworkResourceStatus"):
|
|
return &apiv1alpha1.NetworkResourceStatusApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("NetworkRouter"):
|
|
return &apiv1alpha1.NetworkRouterApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("NetworkRouterSpec"):
|
|
return &apiv1alpha1.NetworkRouterSpecApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("NetworkRouterStatus"):
|
|
return &apiv1alpha1.NetworkRouterStatusApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("ResourceReference"):
|
|
return &apiv1alpha1.ResourceReferenceApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("SetupKey"):
|
|
return &apiv1alpha1.SetupKeyApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("SetupKeySpec"):
|
|
return &apiv1alpha1.SetupKeySpecApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("SetupKeyStatus"):
|
|
return &apiv1alpha1.SetupKeyStatusApplyConfiguration{}
|
|
case v1alpha1.SchemeGroupVersion.WithKind("WorkloadOverride"):
|
|
return &apiv1alpha1.WorkloadOverrideApplyConfiguration{}
|
|
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func NewTypeConverter(scheme *runtime.Scheme) managedfields.TypeConverter {
|
|
return managedfields.NewSchemeTypeConverter(scheme, internal.Parser())
|
|
}
|