added test case for numeric pointer diffs, they didn't work previously (showed no diff)
fixed the above issue with some number handling and JSON marshaling changes and
Why?
k8s.io/apimachinery/pkg/util/intstr.IntOrString behaves really badly from JSON marshaling point of view, it can't be empty basically. So we need to override the defined marshaling behaviour and write nil
instead of 0, because usually (in all observed cases) 0 means "not set" for IntOrStr types. To make this happen we need to pull in json-iterator and override the factory marshaling overrides.
Signed-off-by: Nandor Kracser bonifaido@gmail.com
What's in this PR?
Why?
k8s.io/apimachinery/pkg/util/intstr.IntOrString
behaves really badly from JSON marshaling point of view, it can't be empty basically. So we need to override the defined marshaling behaviour and write nil instead of 0, because usually (in all observed cases) 0 means "not set" for IntOrStr types. To make this happen we need to pull in json-iterator and override the factory marshaling overrides.Additional context