mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Extend StandardStorage with Destroy to implement rbac storage destroy
This commit is contained in:
parent
80060a502c
commit
f62c14a9cc
@ -689,3 +689,6 @@ func (ms *mockStore) NewList() runtime.Object {
|
||||
func (ms *mockStore) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (ms *mockStore) Destroy() {
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ func NewStorage(s rest.StandardStorage, authorizer authorizer.Authorizer, ruleRe
|
||||
|
||||
// Destroy cleans up resources on shutdown.
|
||||
func (r *Storage) Destroy() {
|
||||
// FIXME: Do we have to anything to destroy here?
|
||||
r.StandardStorage.Destroy()
|
||||
}
|
||||
|
||||
func (r *Storage) NamespaceScoped() bool {
|
||||
|
@ -49,7 +49,7 @@ func NewStorage(s rest.StandardStorage, authorizer authorizer.Authorizer, ruleRe
|
||||
|
||||
// Destroy cleans up resources on shutdown.
|
||||
func (r *Storage) Destroy() {
|
||||
// FIXME: Do we have to anything to destroy here?
|
||||
r.StandardStorage.Destroy()
|
||||
}
|
||||
|
||||
func (r *Storage) NamespaceScoped() bool {
|
||||
|
@ -47,7 +47,7 @@ func NewStorage(s rest.StandardStorage, authorizer authorizer.Authorizer, ruleRe
|
||||
|
||||
// Destroy cleans up resources on shutdown.
|
||||
func (r *Storage) Destroy() {
|
||||
// FIXME: Do we have to anything to destroy here?
|
||||
r.StandardStorage.Destroy()
|
||||
}
|
||||
|
||||
func (r *Storage) NamespaceScoped() bool {
|
||||
|
@ -50,7 +50,7 @@ func NewStorage(s rest.StandardStorage, authorizer authorizer.Authorizer, ruleRe
|
||||
|
||||
// Destroy cleans up resources on shutdown.
|
||||
func (r *Storage) Destroy() {
|
||||
// FIXME: Do we have to anything to destroy here?
|
||||
r.StandardStorage.Destroy()
|
||||
}
|
||||
|
||||
func (r *Storage) NamespaceScoped() bool {
|
||||
|
@ -283,6 +283,11 @@ type StandardStorage interface {
|
||||
GracefulDeleter
|
||||
CollectionDeleter
|
||||
Watcher
|
||||
|
||||
// Destroy cleans up its resources on shutdown.
|
||||
// Destroy has to be implemented in thread-safe way and be prepared
|
||||
// for being called more than once.
|
||||
Destroy()
|
||||
}
|
||||
|
||||
// Redirector know how to return a remote resource's location.
|
||||
|
Loading…
Reference in New Issue
Block a user