mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +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
|
// rawValue converts the request, limit to *json.RawMessage
|
||||||
func rawRequestLimit(request, limit string) *json.RawMessage {
|
func rawRequestLimit(request, limit string) *json.RawMessage {
|
||||||
if request == "" {
|
if request == "" {
|
||||||
return rawValue(fmt.Sprintf(`{"limit":%q}`, limit))
|
request = limit
|
||||||
}
|
}
|
||||||
if limit == "" {
|
if limit == "" {
|
||||||
return rawValue(fmt.Sprintf(`{"request":%q}`, request))
|
limit = request
|
||||||
}
|
}
|
||||||
return rawValue(fmt.Sprintf(`{"request":%q,"limit":%q}`, request, limit))
|
return rawValue(fmt.Sprintf(`{"request":%q,"limit":%q}`, request, limit))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user