INNER CODE UNIT · Go
setupRoleTracker
kubernetes-sigs/kueue · cmd/kueue/main.go:710
func setupRoleTracker(ctx context.Context, mgr ctrl.Manager, cfg *configapi.Configuration) *roletracker.RoleTracker {
if cfg.LeaderElection != nil && ptr.Deref(cfg.LeaderElection.LeaderElect, false) {
tracker := roletracker.NewRoleTracker(mgr.Elected())
go tracker.Start(ctx, setupLog)
setupLog.Info("RoleTracker: leader election enabled")
return tracker
}
setupLog.Info("RoleTracker: running in standalone mode")
return nil
}
func blockForPodsReady(cfg *configapi.Configuration) bool {
return waitforpodsready.Enabled(cfg.WaitForPodsReady) &&
cfg.WaitForPodsReady.BlockAdmission != nil &&
*cfg.WaitForPodsReady.BlockAdmission
}
func podsReadyRequeuingTimestamp(cfg *configapi.Configuration) configapi.RequeuingTimestamp {