You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Figured it out, in case, anyone's wondering, had to construct the request using SubResource and Suffix and then parse it into struct; see code here
request:=clientset.CoreV1().RESTClient().Get().Resource("nodes").Name(node.Name).SubResource("proxy").Suffix("stats/summary")
responseRawArrayOfBytes, err:=request.DoRaw()
iferr!=nil {
returnnil, errors.Wrap(err, "failed to get stats from node")
}
With newer versions of client-go, context is needed for DoRaw(), so it would actually be:
request:=clientset.CoreV1().RESTClient().Get().Resource("nodes").Name(node.Name).SubResource("proxy").Suffix("stats/summary")
responseRawArrayOfBytes, err:=request.DoRaw(context.Background())
iferr!=nil {
returnnil, errors.Wrap(err, "failed to get stats from node")
}
No description provided.
The text was updated successfully, but these errors were encountered: