Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ func main() {
syncerConfig := conf.GetConfigOrDie[commitments.SyncerConfig]()
if err := (&task.Runner{
Client: multiclusterClient,
Interval: syncerConfig.SyncInterval,
Interval: syncerConfig.SyncInterval.Duration,
Name: "commitments-sync-task",
Run: func(ctx context.Context) error { return syncer.SyncReservations(ctx) },
Init: func(ctx context.Context) error { return syncer.Init(ctx, syncerConfig) },
Expand Down
1 change: 1 addition & 0 deletions helm/bundles/cortex-nova/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ cortex-scheduling-controllers:
capacityReconcileInterval: 5m
enabledTasks:
- nova-history-cleanup-task
- commitments-sync-task
# If true, the external scheduler API will limit the list of hosts in its
# response to those included in the scheduling request.
novaLimitHostsToRequest: true
Expand Down
4 changes: 2 additions & 2 deletions internal/scheduling/reservations/commitments/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type SyncerConfig struct {
// Secret ref to SSO credentials stored in a k8s secret, if applicable.
SSOSecretRef *corev1.SecretReference `json:"ssoSecretRef"`
// SyncInterval defines how often the syncer reconciles Limes commitments to Reservation CRDs.
SyncInterval time.Duration `json:"committedResourceSyncInterval"`
SyncInterval metav1.Duration `json:"committedResourceSyncInterval"`
}

type Syncer struct {
Expand All @@ -58,7 +58,7 @@ func NewSyncer(k8sClient client.Client, monitor *SyncerMonitor) *Syncer {
}

func (s *Syncer) Init(ctx context.Context, config SyncerConfig) error {
s.syncInterval = config.SyncInterval
s.syncInterval = config.SyncInterval.Duration
if err := s.CommitmentsClient.Init(ctx, s.Client, config); err != nil {
return err
}
Expand Down
Loading