From 4dbfcfe34d8fe550873e3f9c23b4d73fbf19c5f6 Mon Sep 17 00:00:00 2001 From: Francesco Ilario Date: Mon, 8 Apr 2024 16:11:26 +0200 Subject: [PATCH] Update controllers/nstemplateset/space_roles.go Co-authored-by: Francisc Munteanu --- controllers/nstemplateset/space_roles.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/nstemplateset/space_roles.go b/controllers/nstemplateset/space_roles.go index 1eacca59..60768494 100644 --- a/controllers/nstemplateset/space_roles.go +++ b/controllers/nstemplateset/space_roles.go @@ -31,7 +31,7 @@ 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 + 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