Check that API server and tappers are running in check cmd (#789)

* Check if API server and tapper are running in check cmd
This commit is contained in:
Igor Gov
2022-02-10 16:00:33 +02:00
committed by GitHub
parent 88e3fba1ef
commit 81e830dd18
2 changed files with 45 additions and 9 deletions

View File

@@ -1000,7 +1000,7 @@ func (provider *Provider) ListAllRunningPodsMatchingRegex(ctx context.Context, r
matchingPods := make([]core.Pod, 0)
for _, pod := range pods {
if isPodRunning(&pod) {
if IsPodRunning(&pod) {
matchingPods = append(matchingPods, pod)
}
}
@@ -1190,6 +1190,6 @@ func loadKubernetesConfiguration(kubeConfigPath string) clientcmd.ClientConfig {
)
}
func isPodRunning(pod *core.Pod) bool {
func IsPodRunning(pod *core.Pod) bool {
return pod.Status.Phase == core.PodRunning
}