From 5286872ce6d52c67a76f4b6a457ab3aa69efbc4e Mon Sep 17 00:00:00 2001 From: Fei-Guo Date: Fri, 8 Nov 2024 17:36:18 -0800 Subject: [PATCH] chore: restruct workspace controller code - part 3 --- pkg/workspace/controllers/workspace_controller.go | 2 +- pkg/workspace/inference/preset-inferences.go | 2 +- pkg/workspace/inference/template_inference.go | 2 +- pkg/{resources => workspace/manifests}/manifests.go | 2 +- pkg/{resources => workspace/manifests}/manifests_test.go | 2 +- pkg/workspace/tuning/preset-tuning.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename pkg/{resources => workspace/manifests}/manifests.go (99%) rename pkg/{resources => workspace/manifests}/manifests_test.go (99%) diff --git a/pkg/workspace/controllers/workspace_controller.go b/pkg/workspace/controllers/workspace_controller.go index 647b37a31..d5d9eee52 100644 --- a/pkg/workspace/controllers/workspace_controller.go +++ b/pkg/workspace/controllers/workspace_controller.go @@ -26,12 +26,12 @@ import ( "github.com/aws/karpenter-core/pkg/apis/v1alpha5" "github.com/go-logr/logr" kaitov1alpha1 "github.com/kaito-project/kaito/api/v1alpha1" - manifests "github.com/kaito-project/kaito/pkg/resources" "github.com/kaito-project/kaito/pkg/utils" "github.com/kaito-project/kaito/pkg/utils/machine" "github.com/kaito-project/kaito/pkg/utils/plugin" "github.com/kaito-project/kaito/pkg/utils/resources" "github.com/kaito-project/kaito/pkg/workspace/inference" + "github.com/kaito-project/kaito/pkg/workspace/manifests" "github.com/samber/lo" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" diff --git a/pkg/workspace/inference/preset-inferences.go b/pkg/workspace/inference/preset-inferences.go index 336a4acc2..1817f7374 100644 --- a/pkg/workspace/inference/preset-inferences.go +++ b/pkg/workspace/inference/preset-inferences.go @@ -13,8 +13,8 @@ import ( kaitov1alpha1 "github.com/kaito-project/kaito/api/v1alpha1" "github.com/kaito-project/kaito/pkg/model" - manifests "github.com/kaito-project/kaito/pkg/resources" "github.com/kaito-project/kaito/pkg/utils/resources" + "github.com/kaito-project/kaito/pkg/workspace/manifests" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/util/intstr" diff --git a/pkg/workspace/inference/template_inference.go b/pkg/workspace/inference/template_inference.go index b72e251a4..9ee573d37 100644 --- a/pkg/workspace/inference/template_inference.go +++ b/pkg/workspace/inference/template_inference.go @@ -6,8 +6,8 @@ import ( "context" kaitov1alpha1 "github.com/kaito-project/kaito/api/v1alpha1" - manifests "github.com/kaito-project/kaito/pkg/resources" "github.com/kaito-project/kaito/pkg/utils/resources" + "github.com/kaito-project/kaito/pkg/workspace/manifests" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/pkg/resources/manifests.go b/pkg/workspace/manifests/manifests.go similarity index 99% rename from pkg/resources/manifests.go rename to pkg/workspace/manifests/manifests.go index fa90b3cab..af8c0601b 100644 --- a/pkg/resources/manifests.go +++ b/pkg/workspace/manifests/manifests.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -package resources +package manifests import ( "context" diff --git a/pkg/resources/manifests_test.go b/pkg/workspace/manifests/manifests_test.go similarity index 99% rename from pkg/resources/manifests_test.go rename to pkg/workspace/manifests/manifests_test.go index 42b28def0..5417e797b 100644 --- a/pkg/resources/manifests_test.go +++ b/pkg/workspace/manifests/manifests_test.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -package resources +package manifests import ( "context" diff --git a/pkg/workspace/tuning/preset-tuning.go b/pkg/workspace/tuning/preset-tuning.go index 112e0016b..5703b1845 100644 --- a/pkg/workspace/tuning/preset-tuning.go +++ b/pkg/workspace/tuning/preset-tuning.go @@ -16,9 +16,9 @@ import ( kaitov1alpha1 "github.com/kaito-project/kaito/api/v1alpha1" "github.com/kaito-project/kaito/pkg/model" - manifests "github.com/kaito-project/kaito/pkg/resources" "github.com/kaito-project/kaito/pkg/utils" "github.com/kaito-project/kaito/pkg/utils/resources" + "github.com/kaito-project/kaito/pkg/workspace/manifests" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/klog/v2"