Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ray-operator: add missing space in controller log messages #316

Merged
merged 1 commit into from
Jun 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions ray-operator/controllers/ray/raycluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ func (r *RayClusterReconciler) createHeadIngress(ingress *networkingv1.Ingress,

if err := r.Create(context.TODO(), ingress); err != nil {
if errors.IsAlreadyExists(err) {
log.Info("Ingress already exists,no need to create")
log.Info("Ingress already exists, no need to create")
return nil
}
log.Error(err, "Ingress create error!", "Ingress.Error", err)
Expand All @@ -457,13 +457,13 @@ func (r *RayClusterReconciler) createHeadService(rayHeadSvc *v1.Service, instanc
return err
}

if errSvc := r.Create(context.TODO(), rayHeadSvc); errSvc != nil {
if errors.IsAlreadyExists(errSvc) {
log.Info("Pod service already exist,no need to create")
if err := r.Create(context.TODO(), rayHeadSvc); err != nil {
if errors.IsAlreadyExists(err) {
log.Info("Pod service already exist, no need to create")
return nil
}
log.Error(errSvc, "Pod Service create error!", "Pod.Service.Error", errSvc)
return errSvc
log.Error(err, "Pod Service create error!", "Pod.Service.Error", err)
return err
}
log.Info("Pod Service created successfully", "service name", rayHeadSvc.Name)
r.Recorder.Eventf(instance, v1.EventTypeNormal, "Created", "Created service %s", rayHeadSvc.Name)
Expand Down Expand Up @@ -637,13 +637,13 @@ func (r *RayClusterReconciler) reconcileAutoscalerServiceAccount(instance *rayio
return err
}

if errSvc := r.Create(context.TODO(), serviceAccount); errSvc != nil {
if errors.IsAlreadyExists(errSvc) {
log.Info("Pod service account already exist,no need to create")
if err := r.Create(context.TODO(), serviceAccount); err != nil {
if errors.IsAlreadyExists(err) {
log.Info("Pod service account already exist, no need to create")
return nil
}
log.Error(errSvc, "Pod Service Account create error!", "Pod.ServiceAccount.Error", errSvc)
return errSvc
log.Error(err, "Pod Service Account create error!", "Pod.ServiceAccount.Error", err)
return err
}
log.Info("Pod ServiceAccount created successfully", "service account name", serviceAccount.Name)
r.Recorder.Eventf(instance, v1.EventTypeNormal, "Created", "Created service account %s", serviceAccount.Name)
Expand Down Expand Up @@ -678,13 +678,13 @@ func (r *RayClusterReconciler) reconcileAutoscalerRole(instance *rayiov1alpha1.R
return err
}

if errSvc := r.Create(context.TODO(), role); errSvc != nil {
if errors.IsAlreadyExists(errSvc) {
log.Info("role already exist,no need to create")
if err := r.Create(context.TODO(), role); err != nil {
if errors.IsAlreadyExists(err) {
log.Info("role already exist, no need to create")
return nil
}
log.Error(errSvc, "Role create error!", "Role.Error", errSvc)
return errSvc
log.Error(err, "Role create error!", "Role.Error", err)
return err
}
log.Info("Role created successfully", "role name", role.Name)
r.Recorder.Eventf(instance, v1.EventTypeNormal, "Created", "Created role %s", role.Name)
Expand Down Expand Up @@ -719,13 +719,13 @@ func (r *RayClusterReconciler) reconcileAutoscalerRoleBinding(instance *rayiov1a
return err
}

if errSvc := r.Create(context.TODO(), roleBinding); errSvc != nil {
if errors.IsAlreadyExists(errSvc) {
log.Info("role binding already exist,no need to create")
if err := r.Create(context.TODO(), roleBinding); err != nil {
if errors.IsAlreadyExists(err) {
log.Info("role binding already exist, no need to create")
return nil
}
log.Error(errSvc, "Role binding create error!", "RoleBinding.Error", errSvc)
return errSvc
log.Error(err, "Role binding create error!", "RoleBinding.Error", err)
return err
}
log.Info("RoleBinding created successfully", "role binding name", roleBinding.Name)
r.Recorder.Eventf(instance, v1.EventTypeNormal, "Created", "Created role binding %s", roleBinding.Name)
Expand Down