mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Merge pull request #41887 from liggitt/watch-verb
Automatic merge from submit-queue (batch tested with PRs 39855, 41433, 41567, 41887, 41652) Use watch param instead of deprecated /watch/ prefix Reopen of https://github.com/kubernetes/kubernetes/pull/41722 after reverted in https://github.com/kubernetes/kubernetes/pull/41774 Required https://github.com/kubernetes/kubernetes/pull/41797 to merge first cc @deads2k @wojtek-t
This commit is contained in:
@@ -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) {
|
||||
@@ -1086,7 +1086,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) {
|
||||
|
||||
Reference in New Issue
Block a user