Revert "Use watch param instead of deprecated /watch/ prefix"

This commit is contained in:
Wojciech Tyczynski
2017-02-21 08:37:51 +01:00
committed by GitHub
parent 6a65964d0e
commit a21b08d00f
116 changed files with 149 additions and 176 deletions

View File

@@ -363,7 +363,7 @@ func SkipIfMissingResource(clientPool dynamic.ClientPool, gvr schema.GroupVersio
Failf("Unexpected error getting dynamic client for %v: %v", gvr.GroupVersion(), err)
}
apiResource := metav1.APIResource{Name: gvr.Resource, Namespaced: true}
_, err = dynamicClient.Resource(&apiResource, namespace).List(metav1.ListOptions{})
_, err = dynamicClient.Resource(&apiResource, namespace).List(&metav1.ListOptions{})
if err != nil {
// not all resources support list, so we ignore those
if apierrs.IsMethodNotSupported(err) || apierrs.IsNotFound(err) || apierrs.IsForbidden(err) {
@@ -1080,7 +1080,7 @@ func hasRemainingContent(c clientset.Interface, clientPool dynamic.ClientPool, n
Logf("namespace: %s, resource: %s, ignored listing per whitelist", namespace, apiResource.Name)
continue
}
obj, err := dynamicClient.Resource(&apiResource, namespace).List(metav1.ListOptions{})
obj, err := dynamicClient.Resource(&apiResource, namespace).List(&metav1.ListOptions{})
if err != nil {
// not all resources support list, so we ignore those
if apierrs.IsMethodNotSupported(err) || apierrs.IsNotFound(err) || apierrs.IsForbidden(err) {