godaddy/kubernetes-client

watch jobs with a hostname labelselector

Open

#374 opened on Dec 18, 2018

View on GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (954 stars) (206 forks)batch import
help wantedquestionrequest for example

Description

Writing code like this:

const jobStream = client.apis.batch.v1.watch.jobs.getStream({ qs: { labelSelector: 'kubernetes.io/hostname=ip-10-0-22-120.us-west-2.compute.internal'}});

Doesn't work. Basically trying to watch all jobs on a host by host basis from a kubernetes daemonset. Tried to manually add a label with the spec.nodeName via the downward api but that doesn't appear to work in the JSON only via the volume api.

Open to ideas!

Thanks!

Contributor guide