Fix unstructured metadata accessors to respect omitempty semantics
ObjectMeta has fields with omitempty json tags. This means that when the fields have zero values, they should not be persisted in the object. Before this commit, some of the metadata accessors for unstructured objects did not respect these semantics i.e they would persist a field even if it had a zero value. This commit updates the accessors so that the field is removed from the unstructured object map if it contains a zero value.
This commit is contained in:
@@ -478,7 +478,6 @@ staging/src/k8s.io/apimachinery/pkg/api/validation/path
|
||||
staging/src/k8s.io/apimachinery/pkg/apis/config/v1alpha1
|
||||
staging/src/k8s.io/apimachinery/pkg/apis/meta/fuzzer
|
||||
staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion
|
||||
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured
|
||||
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation
|
||||
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1
|
||||
staging/src/k8s.io/apimachinery/pkg/apis/testapigroup
|
||||
|
Reference in New Issue
Block a user