Open ekoome opened 5 years ago
I wasn't aware that you were able to watch an individual instance of a resource. Does this work for things other than endpoints?
There's currently no way to do this with this client.
Ability to watch by name is also available on Services - https://v1-9.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#watch-174; and Ingresses- https://v1-9.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#-strong-read-operations-strong--154
This simplifies watch operations. It would be great to have this in the client for completeness.
I took a crack at this and couldn't get watch on an individual configmap working https://github.com/ericchiang/k8s/pull/108
The docs do say that this should work though... https://v1-9.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#watch-210
Going to try to take another go at this later.
How do I set “name” path parameter for endpoint watch in GET /api/v1/watch/namespaces/{namespace}/endpoints/{name} - https://v1-9.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#watch-145
The current api for watch does not have a “name” parameter for the service in this case.
func (c Client) Watch(ctx context.Context, namespace string, r Resource, options ...Option) (Watcher, error)