MCPcopy Create free account
hub / github.com/NVIDIA/gpu-operator / runValidation

Method runValidation

cmd/nvidia-validator/main.go:1842–1862  ·  view source on GitHub ↗
(silent bool)

Source from the content-addressed store, hash-verified

1840}
1841
1842func (c *CCManager) runValidation(silent bool) error {
1843 node, err := getNode(c.ctx, c.kubeClient)
1844 if err != nil {
1845 return fmt.Errorf("unable to fetch node by name %s to check for %s label: %w",
1846 nodeNameFlag, CCCapableLabelKey, err)
1847 }
1848
1849 // make sure this is a CC capable node
1850 nodeLabels := node.GetLabels()
1851 if enabled, ok := nodeLabels[CCCapableLabelKey]; !ok || enabled != "true" {
1852 log.Info("Not a CC capable node, skipping CC Manager validation")
1853 return nil
1854 }
1855
1856 // check if the ccManager container is ready
1857 err = assertCCManagerContainerReady(silent, withWaitFlag)
1858 if err != nil {
1859 return err
1860 }
1861 return nil
1862}
1863
1864func (c *CCManager) setKubeClient(kubeClient kubernetes.Interface) {
1865 c.kubeClient = kubeClient

Callers 1

validateMethod · 0.95

Calls 2

getNodeFunction · 0.85

Tested by

no test coverage detected