Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion cmd/trainer-controller-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,22 @@ func main() {
}

setupLog.Info("Creating manager")
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), options)
restCfg := ctrl.GetConfigOrDie()
// Apply the Configuration.ClientConnection QPS/Burst to the
// manager's rest.Config. Without this, the documented defaults
// (QPS=50, Burst=100) from the Configuration API were validated
// and defaulted but never wired through, so the manager ran with
// the client-go defaults (QPS=5, Burst=10). The status server's
// createClient already uses this pattern (#3431).
if cfg.ClientConnection != nil {
if cfg.ClientConnection.QPS != nil {
restCfg.QPS = *cfg.ClientConnection.QPS
}
if cfg.ClientConnection.Burst != nil {
restCfg.Burst = int(*cfg.ClientConnection.Burst)
}
Comment on lines +122 to +135
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description mentions copying the config (like the status server does), but this code mutates the *rest.Config returned by ctrl.GetConfigOrDie() in place; either update the description or switch to rest.CopyConfig(...) before overriding QPS/Burst for consistency.

Copilot uses AI. Check for mistakes.
}
mgr, err := ctrl.NewManager(restCfg, options)
if err != nil {
setupLog.Error(err, "unable to start manager")
os.Exit(1)
Expand Down
Loading