Optional fields have the following properties:
They have the +optional comment tag in Go.
They are a pointer type in the Go definition (e.g. AwesomeFlag *SomeFlag) or have a built-in nil value (e.g. maps and slices).
The API server should allow POSTing and PUTing a resource with this field unset.
problem we met:
currently PS and Worker is non-pointer, when we json.Marshal a PaddleJob without ps def, will appear something like that which make submission err because of "containers":null
According to the k8s api conventions:
problem we met: currently
PS
andWorker
is non-pointer, when wejson.Marshal
aPaddleJob
without ps def, will appear something like that which make submission err because of"containers":null
So IMO, api def should be improved according to the conventions.
ref: