kubernetes-operators
kubernetes-operators copied to clipboard
Allow required flavor props to be zero-valued
Trying to seed a flavor with 0 disk size fails because the 0-value get's pruned from the flavor spec.
According to https://pkg.go.dev/encoding/json#Marshal the "omitempty" option in the struct definition is to blame for this. Remove it for some fields that are required for a flavor: RAM, Disk & vCPUs.
While it's hard to conceive of a useful flavor without either RAM or CPUs, it might be required for testing -- just like the testing flavor with no disk size that just failed.