Closed Frankkkkk closed 4 years ago
Still missing some tests
Another workaround: use DataField.get_data
in Model._k8s_dict
There will be some problems. It cannot handle some updated scenes.
For example, if you need to delete a field of resource, must be sent field: null
to Kubernetes Patch API (or replace)
I currently deal with this problem in business logic, but I want to be able to decentralize to the model layer.
When creating aand saving a model with some empty (non mandatory) fields, it will fail because of the default value which will be
None
.We should skip this attribute.