mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-08-25 16:07:24 +00:00
chore: move controller main to cmd/controller (#1962)
Signed-off-by: bakito <github@bakito.ch>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// Copyright 2020-2026 Project Capsule Authors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package utils_test
|
||||
|
||||
import (
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user