Skip to content

Commit

Permalink
Sort cluster names in permissions to remove unnecessary updated
Browse files Browse the repository at this point in the history
  • Loading branch information
bastjan committed Jul 31, 2024
1 parent 2279641 commit 12c5719
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 12c5719

Please sign in to comment.