Skip to content

Commit

Permalink
Merge pull request #2 from GDATASoftwareAG/recover-for-most-issues
Browse files Browse the repository at this point in the history
recover for most issues
  • Loading branch information
farodin91 authored Jun 28, 2023
2 parents 95de1a5 + cc5dc3e commit e4d620a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,17 @@ func getMetrics(interval time.Duration, cs *kubernetes.Clientset) {
for {
nodes, err := cs.CoreV1().Nodes().List(context.Background(), metav1.ListOptions{})
if err != nil {
log.Fatalf("ErrorBadRequst : %s", err.Error())
log.Errorf("ErrorBadRequst : %s", err.Error())
time.Sleep(time.Second * 60)
continue
}
var pods []ephemeralStoragePodData
for i := range nodes.Items {
currentNode := nodes.Items[i].Name
node, err := scrapeSingleNode(cs, currentNode)
if err != nil {
log.Fatalf("ErrorBadRequst : %s", err.Error())
log.Errorf("ErrorBadRequst : %s", err.Error())
continue
}
pods = append(pods, node...)
}
Expand Down

0 comments on commit e4d620a

Please sign in to comment.