Allow references to groups by name (#195)

Group names are unique so we can safely use the name as a reference
method to groups. This makes assigning resources created in the cluster
to groups that already exist a lot easier.
This commit is contained in:
Philip Laine
2026-04-23 13:12:09 +02:00
committed by GitHub
parent 1a593dafc2
commit 99ef70603f
14 changed files with 139 additions and 71 deletions
+2 -2
View File
@@ -22,6 +22,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &apiv1alpha1.DNSZoneReferenceApplyConfiguration{}
case v1alpha1.SchemeGroupVersion.WithKind("Group"):
return &apiv1alpha1.GroupApplyConfiguration{}
case v1alpha1.SchemeGroupVersion.WithKind("GroupReference"):
return &apiv1alpha1.GroupReferenceApplyConfiguration{}
case v1alpha1.SchemeGroupVersion.WithKind("GroupSpec"):
return &apiv1alpha1.GroupSpecApplyConfiguration{}
case v1alpha1.SchemeGroupVersion.WithKind("GroupStatus"):
@@ -38,8 +40,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
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"):