Skip to content

Commit

Permalink
Fixing role quotas update in server
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayja committed Mar 29, 2024
1 parent 9d3edf7 commit 9782d5e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions controllers/access_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,16 @@ func (roleCreate aerospikeRoleCreateUpdate) updateRole(
}
}

if role.ReadQuota != roleCreate.readQuota || role.WriteQuota != roleCreate.writeQuota {
if err := client.SetQuotas(
adminPolicy, roleCreate.name, roleCreate.readQuota, roleCreate.writeQuota,
); err != nil {
return fmt.Errorf(
"error setting quotas for role %s: %v", roleCreate.name, err,
)
}
}

logger.Info("Updated role", "role name", roleCreate.name)
recorder.Eventf(
aeroCluster, corev1.EventTypeNormal, "RoleUpdated",
Expand Down

0 comments on commit 9782d5e

Please sign in to comment.