You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
If I understand the existing code correctly, it looks like we currently call ensureClusterRoles in a loop for each scope template that references the scope template we're reconciling.
My understanding of the existing code is that once a ScopeInstance is found to reference the ScopeTemplate being reconciled it will create/update ClusterRoles using the ensureClusterRoles and then break
If I understand the existing code correctly, it looks like we currently call ensureClusterRoles in a loop for each scope template that references the scope template we're reconciling.
https://github.com/awgreene/oria-operator/blob/9594791bb669df7572f353346ffd85ee0460bfc7/controllers/scopetemplate_controller.go#L96-L100
This will cause a bunch of unnecessary chatter with the API server because we'll end up sending a bunch of redundant update calls after the first one.
Instead, perhaps we should call
ensureClusterRoles
once behind a check forlen(scopeInstancesThatReferenceScopeTemplate) > 0
?The text was updated successfully, but these errors were encountered: