The Kubernetes API Conventions Optional vs Required states:
Optional fields have the following properties:
- They are a pointer type in the Go definition (e.g.
bool *awesomeFlag) or have a built-in nil value (e.g. maps and slices).
string does not have a built-in nil value, but does have a similar empty, "", value. The Kubernetes core API implements optional strings as both non-pointers and pointers. I presume these non-pointers predate the pointer convention. PodSpec, for example, has 8 optional strings, the first 7 are non-pointers, the last 1 is a pointer.
https://github.com/kubernetes/api/blob/6c11c9e4685cc62e4ddc8d4aaa824c46150c9148/core/v1/types.go#L3353-L3360
https://github.com/kubernetes/api/blob/6c11c9e4685cc62e4ddc8d4aaa824c46150c9148/core/v1/types.go#L3379-L3385
The recipe has several fields of type string, most are probably optional and should be pointers.