@@ -14,26 +14,27 @@ var _ recommender.Recommender = &ResourceRecommender{}
1414
1515type ResourceRecommender struct {
1616 base.BaseRecommender
17- CpuSampleInterval string
18- CpuRequestPercentile string
19- CpuRequestMarginFraction string
20- CpuTargetUtilization string
21- CpuModelHistoryLength string
22- MemSampleInterval string
23- MemPercentile string
24- MemMarginFraction string
25- MemTargetUtilization string
26- MemHistoryLength string
27- OOMProtection bool
28- OOMHistoryLength time.Duration
29- OOMBumpRatio float64
30- Specification bool
31- SpecificationConfigs []Specification
32- CpuHistogramBucketSize string
33- CpuHistogramMaxValue string
34- MemHistogramBucketSize string
35- MemHistogramMaxValue string
36- HistoryCompletionCheck bool
17+ CpuSampleInterval string
18+ CpuRequestPercentile string
19+ CpuRequestMarginFraction string
20+ CpuTargetUtilization string
21+ CpuModelHistoryLength string
22+ MemSampleInterval string
23+ MemPercentile string
24+ MemMarginFraction string
25+ MemTargetUtilization string
26+ MemHistoryLength string
27+ OOMProtection bool
28+ OOMHistoryLength time.Duration
29+ OOMBumpRatio float64
30+ Specification bool
31+ SpecificationConfigs []Specification
32+ CpuHistogramBucketSize string
33+ CpuHistogramMaxValue string
34+ MemHistogramBucketSize string
35+ MemHistogramMaxValue string
36+ HistoryCompletionCheck bool
37+ ResourceComplianceRecommendation bool
3738}
3839
3940func init () {
@@ -94,6 +95,10 @@ func NewResourceRecommender(recommender apis.Recommender, recommendationRule ana
9495 if err != nil {
9596 return nil , err
9697 }
98+ resourceComplianceRecommendation , err := recommender .GetConfigBool ("resource-compliance-recommendation-check" , false )
99+ if err != nil {
100+ return nil , err
101+ }
97102
98103 return & ResourceRecommender {
99104 * base .NewBaseRecommender (recommender ),
@@ -117,5 +122,6 @@ func NewResourceRecommender(recommender apis.Recommender, recommendationRule ana
117122 memHistogramBucketSize ,
118123 memHistogramMaxValue ,
119124 historyCompletion ,
125+ resourceComplianceRecommendation ,
120126 }, nil
121127}
0 commit comments