chore: move controller main to cmd/controller (#1962)

Signed-off-by: bakito <github@bakito.ch>
This commit is contained in:
Marc Brugger
2026-06-09 23:33:18 +02:00
committed by GitHub
parent a435068433
commit f4af5c8043
25 changed files with 147 additions and 113 deletions
+1
View File
@@ -1,5 +1,6 @@
// Copyright 2020-2026 Project Capsule Authors
// SPDX-License-Identifier: Apache-2.0
package utils_test
import (
+3 -3
View File
@@ -12,15 +12,15 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"github.com/projectcapsule/capsule/api/v1beta1"
"github.com/projectcapsule/capsule/api/v1beta2"
capsulev1beta2 "github.com/projectcapsule/capsule/api/v1beta2"
"github.com/projectcapsule/capsule/pkg/api/meta"
)
func GetTypeLabel(t runtime.Object) (label string, err error) {
switch v := t.(type) {
case *v1beta1.Tenant, *v1beta2.Tenant:
case *v1beta1.Tenant, *capsulev1beta2.Tenant:
return meta.TenantLabel, nil
case *v1beta2.ResourcePool:
case *capsulev1beta2.ResourcePool:
return meta.ResourcePoolLabel, nil
case *corev1.LimitRange:
return meta.LimitRangeLabel, nil