(node *kcore.Node)
| 174 | } |
| 175 | |
| 176 | func nodeComputeAllocatable(node *kcore.Node) userconfig.Compute { |
| 177 | gpuQty := node.Status.Allocatable["nvidia.com/gpu"] |
| 178 | infQty := node.Status.Allocatable["aws.amazon.com/neuron"] |
| 179 | |
| 180 | return userconfig.Compute{ |
| 181 | CPU: k8s.WrapQuantity(*node.Status.Allocatable.Cpu()), |
| 182 | Mem: k8s.WrapQuantity(*node.Status.Allocatable.Memory()), |
| 183 | GPU: gpuQty.Value(), |
| 184 | Inf: infQty.Value(), |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | func getOperatorNodeInfos() ([]schema.NodeInfo, error) { |
| 189 | nodes, err := config.K8sAllNamspaces.ListNodesByLabel("operator", "true") |
no test coverage detected