@@ -37,13 +37,14 @@ type AppWrapperConfig struct {
37
37
}
38
38
39
39
type FaultToleranceConfig struct {
40
- WarmupGracePeriod time.Duration `json:"warmupGracePeriod,omitempty"`
41
- FailureGracePeriod time.Duration `json:"failureGracePeriod,omitempty"`
42
- ResetPause time.Duration `json:"resetPause,omitempty"`
43
- RetryLimit int32 `json:"retryLimit,omitempty"`
44
- DeletionGracePeriod time.Duration `json:"deletionGracePeriod,omitempty"`
45
- GracePeriodCeiling time.Duration `json:"gracePeriodCeiling,omitempty"`
46
- SuccessTTLCeiling time.Duration `json:"successTTLCeiling,omitempty"`
40
+ AdmissionGracePeriod time.Duration `json:"admissionGracePeriod,omitempty"`
41
+ WarmupGracePeriod time.Duration `json:"warmupGracePeriod,omitempty"`
42
+ FailureGracePeriod time.Duration `json:"failureGracePeriod,omitempty"`
43
+ ResetPause time.Duration `json:"resetPause,omitempty"`
44
+ RetryLimit int32 `json:"retryLimit,omitempty"`
45
+ DeletionGracePeriod time.Duration `json:"deletionGracePeriod,omitempty"`
46
+ GracePeriodCeiling time.Duration `json:"gracePeriodCeiling,omitempty"`
47
+ SuccessTTLCeiling time.Duration `json:"successTTLCeiling,omitempty"`
47
48
}
48
49
49
50
type CertManagementConfig struct {
@@ -81,13 +82,14 @@ func NewAppWrapperConfig() *AppWrapperConfig {
81
82
DisableChildAdmissionCtrl : false ,
82
83
UserRBACAdmissionCheck : true ,
83
84
FaultTolerance : & FaultToleranceConfig {
84
- WarmupGracePeriod : 5 * time .Minute ,
85
- FailureGracePeriod : 1 * time .Minute ,
86
- ResetPause : 90 * time .Second ,
87
- RetryLimit : 3 ,
88
- DeletionGracePeriod : 10 * time .Minute ,
89
- GracePeriodCeiling : 24 * time .Hour ,
90
- SuccessTTLCeiling : 7 * 24 * time .Hour ,
85
+ AdmissionGracePeriod : 1 * time .Minute ,
86
+ WarmupGracePeriod : 5 * time .Minute ,
87
+ FailureGracePeriod : 1 * time .Minute ,
88
+ ResetPause : 90 * time .Second ,
89
+ RetryLimit : 3 ,
90
+ DeletionGracePeriod : 10 * time .Minute ,
91
+ GracePeriodCeiling : 24 * time .Hour ,
92
+ SuccessTTLCeiling : 7 * 24 * time .Hour ,
91
93
},
92
94
}
93
95
}
@@ -105,6 +107,10 @@ func ValidateAppWrapperConfig(config *AppWrapperConfig) error {
105
107
return fmt .Errorf ("FailureGracePeriod %v exceeds GracePeriodCeiling %v" ,
106
108
config .FaultTolerance .FailureGracePeriod , config .FaultTolerance .GracePeriodCeiling )
107
109
}
110
+ if config .FaultTolerance .AdmissionGracePeriod > config .FaultTolerance .GracePeriodCeiling {
111
+ return fmt .Errorf ("AdmissionGracePeriod %v exceeds GracePeriodCeiling %v" ,
112
+ config .FaultTolerance .AdmissionGracePeriod , config .FaultTolerance .GracePeriodCeiling )
113
+ }
108
114
if config .FaultTolerance .WarmupGracePeriod > config .FaultTolerance .GracePeriodCeiling {
109
115
return fmt .Errorf ("WarmupGracePeriod %v exceeds GracePeriodCeiling %v" ,
110
116
config .FaultTolerance .WarmupGracePeriod , config .FaultTolerance .GracePeriodCeiling )
0 commit comments