controller-tools icon indicating copy to clipboard operation
controller-tools copied to clipboard

🐛 Fix controller-gen/schemapatch with marker allowDangerousTypes

Open phosae opened this issue 2 years ago • 9 comments

when schemapatch with types contain float32/float64, it output these attenions

.../types.go:207:23: found float, the usage of which is highly discouraged, as support for them varies across languages.
Please consider serializing your float as string instead. If you are really sure you want to use them, re-run with
crd:allowDangerousTypes=true

i think it's ok to add allowDangerousTypes marker to schemapatch

after this PR, user can rerun command like

controller-gen schemapatch:manifests=./crd,allowDangerousTypes=true paths=./pkg/apis/... output:dir=./crd

phosae avatar May 15 '23 07:05 phosae