Skip to content

Commit

Permalink
Do not enforce required request values when enabling recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
jgustie committed Oct 28, 2022
1 parent e061ed9 commit 3e68c16
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions pkg/command/recommendation/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,18 +415,8 @@ func checkResourceList(mode applications.RecommendationsMode, name string, minLi
// minmax=minimum|maximum, name=request|limit|targetUtilization, resourceName=cpu|memory

checkResource := func(resourceName, minmax string, value *api.NumberOrString, fixFlag string) bool {
// Even if it is allowed, we can't use it to compare to other values
if value == nil {
// Enforce required values
if mode.Enabled() && name == "request" {
errs = append(errs, &Error{
Message: fmt.Sprintf("missing %s container %s for %s", minmax, name, resourceName),
FixCommand: fixCommand,
FixFlag: fixFlag,
FixValidValues: []string{fmt.Sprintf("%s=%s", resourceName, "VALUE")},
})
}

// Even if it is allowed, we can't use it to compare to other values
return false
}

Expand Down

0 comments on commit 3e68c16

Please sign in to comment.