(silent bool)
| 1840 | } |
| 1841 | |
| 1842 | func (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 | |
| 1864 | func (c *CCManager) setKubeClient(kubeClient kubernetes.Interface) { |
| 1865 | c.kubeClient = kubeClient |
no test coverage detected