mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Merge pull request #14173 from runningwild/PR0
If an isolator's request is nil, populate it with the limit and vice versa
This commit is contained in:
commit
726f1e17c4
@ -212,10 +212,10 @@ func rawValue(value string) *json.RawMessage {
|
||||
// rawValue converts the request, limit to *json.RawMessage
|
||||
func rawRequestLimit(request, limit string) *json.RawMessage {
|
||||
if request == "" {
|
||||
return rawValue(fmt.Sprintf(`{"limit":%q}`, limit))
|
||||
request = limit
|
||||
}
|
||||
if limit == "" {
|
||||
return rawValue(fmt.Sprintf(`{"request":%q}`, request))
|
||||
limit = request
|
||||
}
|
||||
return rawValue(fmt.Sprintf(`{"request":%q,"limit":%q}`, request, limit))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user