FetchPodNameList fetches list of all the pods names running on given nodeName
(nodeName string)
| 517 | |
| 518 | // FetchPodNameList fetches list of all the pods names running on given nodeName |
| 519 | func (n Node) FetchPodNameList(nodeName string) ([]string, error) { |
| 520 | podList, err := n.fetchAllPods(nodeName) |
| 521 | if err != nil { |
| 522 | return nil, err |
| 523 | } |
| 524 | var podNamesList []string |
| 525 | for _, pod := range podList.Items { |
| 526 | podNamesList = append(podNamesList, pod.Name) |
| 527 | } |
| 528 | return podNamesList, nil |
| 529 | } |
| 530 | |
| 531 | // TaintScheduledMaintenance adds the scheduled maintenance taint onto a node |
| 532 | func (n Node) TaintScheduledMaintenance(nodeName string, eventID string) error { |