Skip to content

clean unnecessary copy #641

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

Merged
merged 7 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion controllers/idler/idler_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion controllers/nstemplateset/space_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading