Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

How to filter the events of the specified pod #117

Open
tobegit3hub opened this issue Feb 20, 2017 · 1 comment
Open

How to filter the events of the specified pod #117

tobegit3hub opened this issue Feb 20, 2017 · 1 comment

Comments

@tobegit3hub
Copy link

We have used pykube to wrap the kubernetes API for users to get logs or status of the pod. Now we can filter the pod with selecter and get theirs own logs like this.

  pods = pykube.Pod.objects(client).filter(selector={
          "resource_name__in": {train_job.get_kubernetes_resource_name()}
  })

Now we try to filter the event for the specified pods. But the selector will not work. So how can we implement this? We can get all the events now.

events = pykube.Event.objects(api).filter().response['items']
@tobegit3hub
Copy link
Author

Seems that we need to do that in client side yet kubernetes/kubernetes#36304

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant