(labels map[string]string)
| 556 | } |
| 557 | |
| 558 | func 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 | |
| 572 | func getDriverSpec(cr *nvidiav1alpha1.NVIDIADriver, nodePool nodePool) (*driverSpec, error) { |
| 573 | if cr == nil { |
no outgoing calls