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

Function sanitizeDriverLabels

internal/state/driver.go:558–570  ·  view source on GitHub ↗
(labels map[string]string)

Source from the content-addressed store, hash-verified

556}
557
558func sanitizeDriverLabels(labels map[string]string) map[string]string {
559 sanitizedLabels := make(map[string]string)
560 for k, v := range labels {
561 // if the user specifies an override of the "app" or any "app.kubernetes.io/" keys, we skip it.
562 // DaemonSet pod selectors are immutable, so we still want the pods to be selectable as before and working
563 // with the existing daemon set selectors.
564 if k == "app" || strings.HasPrefix(k, "app.kubernetes.io/") {
565 continue
566 }
567 sanitizedLabels[k] = v
568 }
569 return sanitizedLabels
570}
571
572func getDriverSpec(cr *nvidiav1alpha1.NVIDIADriver, nodePool nodePool) (*driverSpec, error) {
573 if cr == nil {

Callers 2

getDriverSpecFunction · 0.85
TestDriverSpecFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestDriverSpecFunction · 0.68