Skip to content

Commit

Permalink
refactor: remove redundant import in raycluster_controller.go
Browse files Browse the repository at this point in the history
  • Loading branch information
davidxia committed Jan 25, 2023
1 parent cbe1865 commit 2b8572b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ray-operator/controllers/ray/raycluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
_ "k8s.io/api/apps/v1beta1"

corev1 "k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
networkingv1 "k8s.io/api/networking/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -93,7 +92,7 @@ func (r *RayClusterReconciler) Reconcile(ctx context.Context, request ctrl.Reque
var err error

// Try to fetch the Event instance
event := &v1.Event{}
event := &corev1.Event{}
if err = r.Get(context.TODO(), request.NamespacedName, event); err == nil {
return r.eventReconcile(request, event)
}
Expand All @@ -114,7 +113,7 @@ func (r *RayClusterReconciler) Reconcile(ctx context.Context, request ctrl.Reque
return ctrl.Result{}, client.IgnoreNotFound(err)
}

func (r *RayClusterReconciler) eventReconcile(request ctrl.Request, event *v1.Event) (ctrl.Result, error) {
func (r *RayClusterReconciler) eventReconcile(request ctrl.Request, event *corev1.Event) (ctrl.Result, error) {
var unhealthyPod *corev1.Pod
pods := corev1.PodList{}

Expand Down Expand Up @@ -315,7 +314,7 @@ func (r *RayClusterReconciler) reconcileServices(instance *rayiov1alpha1.RayClus

// Create head service if there's no existing one in the cluster.
if services.Items == nil || len(services.Items) == 0 {
var raySvc *v1.Service
var raySvc *corev1.Service
var err error
if serviceType == common.HeadService {
labels := make(map[string]string)
Expand Down

0 comments on commit 2b8572b

Please sign in to comment.