Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

[Rest Server] Filter pods without nodename and completed pods #3841

Merged
merged 2 commits into from
Nov 14, 2019

Conversation

abuccts
Copy link
Member

@abuccts abuccts commented Nov 13, 2019

Filter pods without nodename and completed pods in virtual cluster resources.

Filter pods without nodename and completed pods in virtual cluster
resources.
@abuccts abuccts requested a review from yqwang-ms November 13, 2019 08:04
headers: apiserver.token && {Authorization: `Bearer ${apiserver.token}`},
});
return pods.data.items.filter((pod) => {
return (pod.spec.nodeName != null && !(pod.status.phase === 'Succeeded' || pod.status.phase === 'Failed'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!= null and is not empty?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update nodename not to be '', null, undefined, 0, NaN, false

Update nodename check for '', null, undefined.
@abuccts abuccts merged commit c46df1d into master Nov 14, 2019
@abuccts abuccts deleted the xiongyf/filter-pods branch November 14, 2019 05:19
@hzy46 hzy46 mentioned this pull request Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants