mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Unversioned types should not use ambiguous go-int
All external types that are not int64 are now marked as int32, including IntOrString. Prober is now int32 (43 years should be enough of an initial probe time for anyone). Did not change the metadata fields for now.
This commit is contained in:
@@ -489,7 +489,7 @@ func extractMaxValue(field intstr.IntOrString, name string, value int) (int, err
|
||||
if field.IntVal < 0 {
|
||||
return 0, fmt.Errorf("%s must be >= 0", name)
|
||||
}
|
||||
return field.IntVal, nil
|
||||
return field.IntValue(), nil
|
||||
case intstr.String:
|
||||
s := strings.Replace(field.StrVal, "%", "", -1)
|
||||
v, err := strconv.Atoi(s)
|
||||
|
||||
Reference in New Issue
Block a user