This repository was archived by the owner on Feb 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtimings.go
45 lines (34 loc) · 1.89 KB
/
timings.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
Copyright 2023.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package controller
import (
"time"
)
// This file defines all the time constants used in mcad
const (
// Cluster capacity is only refreshed when trying to dispatch AppWrappers and only after
// the previous measurement has timed out, so it is necessary to trigger dispatch on
// a regular basis (we do) to ensure we detect new capacity (such as new schedulable nodes)
clusterCapacityTimeout = time.Minute // how long to cache cluster capacity
cacheConflictTimeout = 5 * time.Minute // when to give up on a cache conflict
// Timeouts for the creation and deletion of wrapped resources and pods
creationTimeout = 2 * time.Minute // minimum wait before aborting an incomplete resource/pod creation
deletionTimeout = 2 * time.Minute // minimum wait before aborting an incomplete resource deletion
// RequeueAfter delays
// This is the maximum delay before the next reconciliation event but reconciliation
// may be triggered earlier due for instance to pod phase changes. Moreover, the reconciliation
// itself may be delayed due to the on-going reconciliation of other events.
deletionDelay = time.Minute // maximum delay before next reconciliation when deleting resources
creationDelay = time.Minute // maximum delay before next reconciliation when starting pods
dispatchDelay = time.Minute // maximum delay before triggering dispatchNext with queued AppWrappers
)