What happened?
In crossplane-contrib/provider-upjet-gcp#623 various fields that appear to really be integers (e.g. port) are generated with type *float64. This led to a request to add paved.GetFloat() - some context and discussion in crossplane/crossplane-runtime#778.
You're not supposed to use floats in Kubernetes APIs. From https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#primitive-types:
Avoid floating-point values as much as possible, and never use them in spec. Floating-point values cannot be reliably round-tripped (encoded and re-decoded) without changing, and have varying precision and representations across languages and architectures.
See for example https://github.com/kubernetes-sigs/json, which deserializes JSON numbers into int64 where possible.
How can we reproduce it?
Take a look at the generated types in crossplane-contrib/provider-upjet-gcp#623.
What happened?
In crossplane-contrib/provider-upjet-gcp#623 various fields that appear to really be integers (e.g.
port) are generated with type*float64. This led to a request to addpaved.GetFloat()- some context and discussion in crossplane/crossplane-runtime#778.You're not supposed to use floats in Kubernetes APIs. From https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#primitive-types:
See for example https://github.com/kubernetes-sigs/json, which deserializes JSON numbers into
int64where possible.How can we reproduce it?
Take a look at the generated types in crossplane-contrib/provider-upjet-gcp#623.