INNER CODE UNIT · Go

assertDriverContainerReady

NVIDIA/gpu-operator · cmd/nvidia-validator/main.go:698

func assertDriverContainerReady(silent bool) error {
	command := shell
	args := []string{"-c", fmt.Sprintf("stat %s", driverContainerStatusFilePath)}

	if withWaitFlag {
		return runCommandWithWait(command, args, sleepIntervalSecondsFlag, silent)
	}

	return runCommand(command, args, silent)
}

// isDriverManagedByOperator determines if the NVIDIA driver is managed by the GPU Operator.
// We check if at least one driver DaemonSet exists in the operator namespace that is
// owned by the ClusterPolicy or NVIDIADriver controllers.
func isDriverManagedByOperator(ctx context.Context) (bool, error) {
	kubeConfig, err := rest.InClusterConfig()
	if err != nil {
		return false, fmt.Errorf("error getting cluster config: %w", err)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…