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

Function getObjectOfKind

internal/state/driver.go:467–474  ·  view source on GitHub ↗
(objs []*unstructured.Unstructured, kind string)

Source from the content-addressed store, hash-verified

465}
466
467func getObjectOfKind(objs []*unstructured.Unstructured, kind string) (*unstructured.Unstructured, error) {
468 for _, obj := range objs {
469 if obj.GetKind() == kind {
470 return obj, nil
471 }
472 }
473 return nil, fmt.Errorf("did not find object of kind '%s' in Object list", kind)
474}
475
476// getDriverName returns a unique name for an NVIDIA driver instance in the format nvidia-<driverType>-driver-<crName>-<osVersion>
477func getDriverName(cr *nvidiav1alpha1.NVIDIADriver, osVersion string) string {

Callers 2

getDaemonsetFromObjectsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected