Skip to content
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

Have jq skip over pods without containerStatuses #21

Merged
merged 1 commit into from Jan 7, 2021

Conversation

robertpenberthy
Copy link
Contributor

A pending pod will not have any containerStatuses as the container has yet to be deployed and this line of code errors with jq: error (at <stdin>:5): Cannot iterate over null (null) on any pod with a pending status (in my case because I purposefully made the pod schedulable) on my nodes. Adding the ? will have jq skip over instances that do not have results.

A pending pod will not have any containerStatuses as the container has yet to be deployed and this line of code errors with `jq: error (at <stdin>:5): Cannot iterate over null (null)` on any pod with a pending status (in my case because I purposefully made the pod schedulable) on my nodes.  Adding the ? will have jq skip over instances that do not have results.
@agapoff agapoff merged commit 8882ebf into agapoff:master Jan 7, 2021
@agapoff
Copy link
Owner

agapoff commented Jan 7, 2021

Thank you

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

Successfully merging this pull request may close these issues.

None yet

2 participants