mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 11:18:16 +00:00
Implement Destroy() method for all registries
This commit is contained in:
@@ -98,6 +98,11 @@ func (r *REST) New() runtime.Object {
|
||||
return r.store.New()
|
||||
}
|
||||
|
||||
// Destroy cleans up resources on shutdown.
|
||||
func (r *REST) Destroy() {
|
||||
r.store.Destroy()
|
||||
}
|
||||
|
||||
func (r *REST) NewList() runtime.Object {
|
||||
return r.store.NewList()
|
||||
}
|
||||
@@ -300,6 +305,12 @@ func (r *StatusREST) New() runtime.Object {
|
||||
return r.store.New()
|
||||
}
|
||||
|
||||
// Destroy cleans up resources on shutdown.
|
||||
func (r *StatusREST) Destroy() {
|
||||
// Given that underlying store is shared with REST,
|
||||
// we don't destroy it here explicitly.
|
||||
}
|
||||
|
||||
// Get retrieves the object from the storage. It is required to support Patch.
|
||||
func (r *StatusREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) {
|
||||
return r.store.Get(ctx, name, options)
|
||||
@@ -325,6 +336,12 @@ func (r *FinalizeREST) New() runtime.Object {
|
||||
return r.store.New()
|
||||
}
|
||||
|
||||
// Destroy cleans up resources on shutdown.
|
||||
func (r *FinalizeREST) Destroy() {
|
||||
// Given that underlying store is shared with REST,
|
||||
// we don't destroy it here explicitly.
|
||||
}
|
||||
|
||||
// Update alters the status finalizers subset of an object.
|
||||
func (r *FinalizeREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) {
|
||||
// We are explicitly setting forceAllowCreate to false in the call to the underlying storage because
|
||||
|
||||
Reference in New Issue
Block a user