MCPcopy Index your code
hub / github.com/aws/aws-node-termination-handler / FetchPodNameList

Method FetchPodNameList

pkg/node/node.go:519–529  ·  view source on GitHub ↗

FetchPodNameList fetches list of all the pods names running on given nodeName

(nodeName string)

Source from the content-addressed store, hash-verified

517
518// FetchPodNameList fetches list of all the pods names running on given nodeName
519func (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
532func (n Node) TaintScheduledMaintenance(nodeName string, eventID string) error {

Callers 2

HandleEventMethod · 0.80
TestFetchPodsNameListFunction · 0.80

Calls 1

fetchAllPodsMethod · 0.95

Tested by 1

TestFetchPodsNameListFunction · 0.64