refactor: Move *Options references to metav1

This commit is contained in:
Clayton Coleman
2017-01-24 10:38:21 -05:00
parent 7b1c715496
commit be6d2933df
92 changed files with 240 additions and 244 deletions

View File

@@ -178,7 +178,7 @@ func deleteCollection(
// resource deletions generically. it will ensure all resources in the namespace are purged prior to releasing
// namespace itself.
orphanDependents := false
err := dynamicClient.Resource(&apiResource, namespace).DeleteCollection(&v1.DeleteOptions{OrphanDependents: &orphanDependents}, &metav1.ListOptions{})
err := dynamicClient.Resource(&apiResource, namespace).DeleteCollection(&metav1.DeleteOptions{OrphanDependents: &orphanDependents}, &metav1.ListOptions{})
if err == nil {
return true, nil
@@ -406,10 +406,10 @@ func syncNamespace(
// if the namespace is already finalized, delete it
if finalized(namespace) {
var opts *v1.DeleteOptions
var opts *metav1.DeleteOptions
uid := namespace.UID
if len(uid) > 0 {
opts = &v1.DeleteOptions{Preconditions: &v1.Preconditions{UID: &uid}}
opts = &metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &uid}}
}
err = kubeClient.Core().Namespaces().Delete(namespace.Name, opts)
if err != nil && !errors.IsNotFound(err) {