mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-29 21:29:24 +00:00
Automatic merge from submit-queue (batch tested with PRs 44424, 44026, 43939, 44386, 42914) Preserve int data when unmarshalling for TPR **What this PR does / why we need it**: The Go json package converts all numbers to float64 while unmarshalling. This exposes many of the int64 fields to corruption when marshalled back to json. The json package provided by kubernetes also provides a way to defer conversion of numbers (https://golang.org/pkg/encoding/json/#Decoder.UseNumber) and does the conversions to int or float. This is also implemented in the custom json package. See: (https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/util/json/json.go) Now, the number is preserved as an integer till the highest int64 number - `9223372036854775807`. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #30213 **Special notes for your reviewer**: See also https://github.com/kubernetes/kubernetes/pull/16964 **Release note**: ``` NONE ```