MCPcopy
hub / github.com/cortexlabs/cortex / ListNodesWithLabelKeys

Method ListNodesWithLabelKeys

pkg/lib/k8s/node.go:60–65  ·  view source on GitHub ↗
(labelKeys ...string)

Source from the content-addressed store, hash-verified

58}
59
60func (c *Client) ListNodesWithLabelKeys(labelKeys ...string) ([]kcore.Node, error) {
61 opts := &kmeta.ListOptions{
62 LabelSelector: LabelExistsSelector(labelKeys...),
63 }
64 return c.ListNodes(opts)
65}
66
67func HowManyPodsFitOnNode(podSpec kcore.PodSpec, node kcore.Node, cpuReserved resource.Quantity, memoryReserved resource.Quantity) int64 {
68 cpuQty := node.Status.Allocatable[v1.ResourceCPU]

Callers

nothing calls this directly

Calls 2

ListNodesMethod · 0.95
LabelExistsSelectorFunction · 0.85

Tested by

no test coverage detected