From 28cca131c7251b6d8e29cc860c77ff2f1c00833a Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Wed, 4 Sep 2024 15:28:44 +0800 Subject: [PATCH] refactor: renamed module to github.com/baizeai/kcover Signed-off-by: Neko Ayaka --- cmd/collector-controller/main.go | 8 ++++---- cmd/kcover/main.go | 10 +++++----- go.mod | 2 +- pkg/constants/const.go | 2 +- pkg/diagnosis/collector.go | 4 ++-- pkg/diagnosis/controller/controller.go | 8 ++++---- pkg/diagnosis/nvidiadiag/nvidia_diag.go | 6 +++--- pkg/diagnosis/podstatus/pod_status.go | 8 ++++---- pkg/events/events.go | 2 +- pkg/events/kubeevents.go | 2 +- pkg/recovery/recovery.go | 4 ++-- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/cmd/collector-controller/main.go b/cmd/collector-controller/main.go index e3b02f2..7972b17 100644 --- a/cmd/collector-controller/main.go +++ b/cmd/collector-controller/main.go @@ -5,12 +5,12 @@ import ( "os/signal" "syscall" + "github.com/baizeai/kcover/pkg/diagnosis" + "github.com/baizeai/kcover/pkg/diagnosis/nvidiadiag" + "github.com/baizeai/kcover/pkg/events" + "github.com/baizeai/kcover/pkg/kube" "k8s.io/client-go/kubernetes" "k8s.io/klog/v2" - "recovery.baizeai.io/pkg/diagnosis" - "recovery.baizeai.io/pkg/diagnosis/nvidiadiag" - "recovery.baizeai.io/pkg/events" - "recovery.baizeai.io/pkg/kube" ) func main() { diff --git a/cmd/kcover/main.go b/cmd/kcover/main.go index a47d07f..f4241eb 100644 --- a/cmd/kcover/main.go +++ b/cmd/kcover/main.go @@ -5,17 +5,17 @@ import ( "os" "time" + "github.com/baizeai/kcover/pkg/diagnosis/controller" + "github.com/baizeai/kcover/pkg/events" + "github.com/baizeai/kcover/pkg/kube" + "github.com/baizeai/kcover/pkg/recovery" + "github.com/baizeai/kcover/pkg/runner" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" coordinationv1client "k8s.io/client-go/kubernetes/typed/coordination/v1" "k8s.io/client-go/tools/leaderelection" "k8s.io/client-go/tools/leaderelection/resourcelock" "k8s.io/klog/v2" - "recovery.baizeai.io/pkg/diagnosis/controller" - "recovery.baizeai.io/pkg/events" - "recovery.baizeai.io/pkg/kube" - "recovery.baizeai.io/pkg/recovery" - "recovery.baizeai.io/pkg/runner" ) func main() { diff --git a/go.mod b/go.mod index a837421..d5f972b 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module recovery.baizeai.io +module github.com/baizeai/kcover go 1.22.0 diff --git a/pkg/constants/const.go b/pkg/constants/const.go index 766ba42..ba1bab4 100644 --- a/pkg/constants/const.go +++ b/pkg/constants/const.go @@ -4,7 +4,7 @@ const ( KubeflowJobLabel = "training.kubeflow.org/job-name" // recovery annotations - NeedRecoveryAnnotation = "recovery.baizeai.io/need-recovery" + NeedRecoveryAnnotation = "kcover.io/need-recovery" EnabledRecoveryLabel = "kcover.io/cascading-recovery" diff --git a/pkg/diagnosis/collector.go b/pkg/diagnosis/collector.go index f64d2ed..ed8899d 100644 --- a/pkg/diagnosis/collector.go +++ b/pkg/diagnosis/collector.go @@ -1,8 +1,8 @@ package diagnosis import ( - "recovery.baizeai.io/pkg/events" - "recovery.baizeai.io/pkg/runner" + "github.com/baizeai/kcover/pkg/events" + "github.com/baizeai/kcover/pkg/runner" ) type Diagnostic interface { diff --git a/pkg/diagnosis/controller/controller.go b/pkg/diagnosis/controller/controller.go index 36d35e2..99351c5 100644 --- a/pkg/diagnosis/controller/controller.go +++ b/pkg/diagnosis/controller/controller.go @@ -3,12 +3,12 @@ package controller import ( "fmt" + "github.com/baizeai/kcover/pkg/diagnosis" + "github.com/baizeai/kcover/pkg/diagnosis/podstatus" + "github.com/baizeai/kcover/pkg/events" + "github.com/baizeai/kcover/pkg/runner" "k8s.io/client-go/kubernetes" "k8s.io/klog/v2" - "recovery.baizeai.io/pkg/diagnosis" - "recovery.baizeai.io/pkg/diagnosis/podstatus" - "recovery.baizeai.io/pkg/events" - "recovery.baizeai.io/pkg/runner" ) var _ runner.Runner = (*controllerDiagnostic)(nil) diff --git a/pkg/diagnosis/nvidiadiag/nvidia_diag.go b/pkg/diagnosis/nvidiadiag/nvidia_diag.go index 8d5e29d..6336426 100644 --- a/pkg/diagnosis/nvidiadiag/nvidia_diag.go +++ b/pkg/diagnosis/nvidiadiag/nvidia_diag.go @@ -3,10 +3,10 @@ package nvidiadiag import ( "time" + "github.com/baizeai/kcover/pkg/diagnosis" + "github.com/baizeai/kcover/pkg/events" + "github.com/baizeai/kcover/pkg/runner" "k8s.io/klog/v2" - "recovery.baizeai.io/pkg/diagnosis" - "recovery.baizeai.io/pkg/events" - "recovery.baizeai.io/pkg/runner" ) var _ runner.Runner = (*dcgmDiag)(nil) diff --git a/pkg/diagnosis/podstatus/pod_status.go b/pkg/diagnosis/podstatus/pod_status.go index a48d9aa..d9dade1 100644 --- a/pkg/diagnosis/podstatus/pod_status.go +++ b/pkg/diagnosis/podstatus/pod_status.go @@ -5,14 +5,14 @@ import ( "reflect" "time" + "github.com/baizeai/kcover/pkg/constants" + "github.com/baizeai/kcover/pkg/diagnosis" + "github.com/baizeai/kcover/pkg/events" + "github.com/baizeai/kcover/pkg/runner" corev1 "k8s.io/api/core/v1" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" - "recovery.baizeai.io/pkg/constants" - "recovery.baizeai.io/pkg/diagnosis" - "recovery.baizeai.io/pkg/events" - "recovery.baizeai.io/pkg/runner" ) var _ runner.Runner = (*podStatusCollector)(nil) diff --git a/pkg/events/events.go b/pkg/events/events.go index 32b5ac8..aef224d 100644 --- a/pkg/events/events.go +++ b/pkg/events/events.go @@ -1,6 +1,6 @@ package events -import "recovery.baizeai.io/pkg/runner" +import "github.com/baizeai/kcover/pkg/runner" type TargetType string diff --git a/pkg/events/kubeevents.go b/pkg/events/kubeevents.go index f08db3c..1e02479 100644 --- a/pkg/events/kubeevents.go +++ b/pkg/events/kubeevents.go @@ -14,12 +14,12 @@ import ( "k8s.io/client-go/tools/record" "k8s.io/client-go/tools/reference" + "github.com/baizeai/kcover/pkg/constants" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" - "recovery.baizeai.io/pkg/constants" ) type kubeEventsRecorder struct { diff --git a/pkg/recovery/recovery.go b/pkg/recovery/recovery.go index 905357e..ea39a84 100644 --- a/pkg/recovery/recovery.go +++ b/pkg/recovery/recovery.go @@ -7,13 +7,13 @@ import ( "github.com/samber/lo" + "github.com/baizeai/kcover/pkg/constants" + "github.com/baizeai/kcover/pkg/events" "github.com/jellydator/ttlcache/v3" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" "k8s.io/klog/v2" - "recovery.baizeai.io/pkg/constants" - "recovery.baizeai.io/pkg/events" ) type RecoveryController struct {