Files
netbird-kubernetes-operator/pkg/applyconfigurations/utils.go
T
Philip LaineandGitHub 9c4ca73712 Implement group resource (#181)
This change implements a new group resource. 

It also sets the standard for a resource reference will be done through
out the controller. A resource reference can either be done by ID or as
a local named reference to the actual resource. This allows end users to
chose if they want to manage things completely in the cluster or not.

Part of #172

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-04-15 10:16:10 +02:00

41 lines
1.7 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("Group"):
return &apiv1alpha1.GroupApplyConfiguration{}
case v1alpha1.SchemeGroupVersion.WithKind("GroupSpec"):
return &apiv1alpha1.GroupSpecApplyConfiguration{}
case v1alpha1.SchemeGroupVersion.WithKind("GroupStatus"):
return &apiv1alpha1.GroupStatusApplyConfiguration{}
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{}
}
return nil
}
func NewTypeConverter(scheme *runtime.Scheme) managedfields.TypeConverter {
return managedfields.NewSchemeTypeConverter(scheme, internal.Parser())
}