mirror of https://github.com/k3s-io/k3s
547d820588
Fix the Unstructured GetDeletionGracePeriodSeconds accessor which was always returning nil regardless of the underlying stored value. The field value always appearing nil prevents Custom Resource instances from being deleted when garbage collection is enabled for CRs and when DeletePropagationOrphan is used. More generally, this fix means that delete-on-update now works for CR instances. Add some test coverage for Unstructured metadata deserialization. The Unstructured DeletionGracePeriodSeconds field marshals as a value type from JSON and as a pointer type via SetDeletionGracePeriodSeconds. The GetDeletionGracePeriodSeconds method now supports handling both int64 and *int64 values so that either underlying value can be returned. Add a reflection-based unit test which attempts to exercise all the Object Get/Set methods for nil handling. |
||
---|---|---|
.. | ||
BUILD | ||
api_meta_help_test.go | ||
api_meta_meta_test.go | ||
api_meta_scheme_test.go | ||
apis_meta_v1_unstructed_unstructure_test.go | ||
doc.go | ||
runtime_helper_test.go | ||
runtime_serializer_protobuf_protobuf_test.go | ||
runtime_unversioned_test.go | ||
watch_until_test.go |