diff --git a/controllers/idler/idler_controller.go b/controllers/idler/idler_controller.go index b3e9eaf1..9036bcce 100644 --- a/controllers/idler/idler_controller.go +++ b/controllers/idler/idler_controller.go @@ -141,7 +141,6 @@ func (r *Reconciler) ensureIdling(ctx context.Context, idler *toolchainv1alpha1. requeueAfter := time.Duration(idler.Spec.TimeoutSeconds) * time.Second newStatusPods := make([]toolchainv1alpha1.Pod, 0, 10) for _, pod := range podList.Items { - pod := pod // TODO We won't need it after upgrading to go 1.22: https://go.dev/blog/loopvar-preview podLogger := log.FromContext(ctx).WithValues("pod_name", pod.Name, "pod_phase", pod.Status.Phase) podCtx := log.IntoContext(ctx, podLogger) timeoutSeconds := idler.Spec.TimeoutSeconds diff --git a/controllers/nstemplateset/space_roles.go b/controllers/nstemplateset/space_roles.go index 3d1f70b8..a632ac48 100644 --- a/controllers/nstemplateset/space_roles.go +++ b/controllers/nstemplateset/space_roles.go @@ -30,7 +30,6 @@ func (r *spaceRolesManager) ensure(ctx context.Context, nsTmplSet *toolchainv1al } logger.Info("ensuring space roles", "namespace_count", len(nss), "role_count", len(nsTmplSet.Spec.SpaceRoles)) for _, ns := range nss { - ns := ns // TODO We won't need it after upgrading to go 1.22: https://go.dev/blog/loopvar-preview // space roles previously applied // read annotation to see what was applied last time, so we can compare with the new SpaceRoles and remove all obsolete resources (based on their kind/names) var lastAppliedSpaceRoles []toolchainv1alpha1.NSTemplateSetSpaceRole