-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Querying for an event based on InvolvedObject fields #2460
Labels
Comments
nathanieltalbot
changed the title
Querying for an event based InvolvedObject fields
Querying for an event based on InvolvedObject fields
Sep 2, 2020
hmm, I think we're just missing it's support in DSL |
I don't see any problem in adding it :-) |
@nathanieltalbot : Is this only applicable to Events? On a closer look, I think you should be able to do it by just adding a field selector:
|
But this looks cleaner if we had support for this:
|
rohanKanojia
added a commit
to rohanKanojia/kubernetes-client
that referenced
this issue
Sep 17, 2020
Added an `withInvolvedObject(ObjectReference objectReference)` method in Filterable interface which would transform object references into fieldsSelector values
11 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm currently trying to write queries for the kubernetes client that allow me to get all of the events for a given deployment. Based on the
--v=8
output from kubectl, the URL for the raw GET request to the API should look something like this:GET
/api/v1/namespaces/{namespace}/events?fieldSelector=involvedObject.name={name}&involvedObject.namespace={namespace}&involvedObject.kind=Deployment&involvedObject.uid={UID}
However, it doesn't seem as if I can make the same query with the DSL syntax.
kubernetesClient.v1().events().inNamespace(namespace)
doesn't seem to offer awithObject
orwithInvolvedObject
or similar syntax, unless I'm mistaken. Is this possible or is there a reason why it isn't?The involvedObject field is documented in the Kubernetes API spec here: https://v1-15.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.15/#deploymentcondition-v1-apps
The text was updated successfully, but these errors were encountered: