Skip to content

Commit

Permalink
Sort cluster names in permissions to remove unnecessary updates (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastjan authored Jul 31, 2024
1 parent 2279641 commit 187a317
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/tenant/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package tenant

import (
"fmt"
"slices"

"github.com/projectsyn/lieutenant-operator/api/v1alpha1"
synv1alpha1 "github.com/projectsyn/lieutenant-operator/api/v1alpha1"
Expand Down Expand Up @@ -29,6 +30,7 @@ func reconcileRole(obj pipeline.Object, data *pipeline.Context) pipeline.Result
for _, c := range cls.Items {
clusterNames = append(clusterNames, c.Name)
}
slices.Sort(clusterNames)

role := rbacv1.Role{
ObjectMeta: metav1.ObjectMeta{
Expand Down

0 comments on commit 187a317

Please sign in to comment.