refactor: Move *Options references to metav1
This commit is contained in:
@@ -79,7 +79,7 @@ func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, *StatusREST, *Finaliz
|
||||
}
|
||||
|
||||
// Delete enforces life-cycle rules for namespace termination
|
||||
func (r *REST) Delete(ctx genericapirequest.Context, name string, options *api.DeleteOptions) (runtime.Object, error) {
|
||||
func (r *REST) Delete(ctx genericapirequest.Context, name string, options *metav1.DeleteOptions) (runtime.Object, error) {
|
||||
nsObj, err := r.Get(ctx, name, &metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -89,10 +89,10 @@ func (r *REST) Delete(ctx genericapirequest.Context, name string, options *api.D
|
||||
|
||||
// Ensure we have a UID precondition
|
||||
if options == nil {
|
||||
options = api.NewDeleteOptions(0)
|
||||
options = metav1.NewDeleteOptions(0)
|
||||
}
|
||||
if options.Preconditions == nil {
|
||||
options.Preconditions = &api.Preconditions{}
|
||||
options.Preconditions = &metav1.Preconditions{}
|
||||
}
|
||||
if options.Preconditions.UID == nil {
|
||||
options.Preconditions.UID = &namespace.UID
|
||||
|
Reference in New Issue
Block a user