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

Function addPullSecrets

controllers/object_controls.go:3947–3953  ·  view source on GitHub ↗
(podSpec *corev1.PodSpec, secrets []string)

Source from the content-addressed store, hash-verified

3945}
3946
3947func addPullSecrets(podSpec *corev1.PodSpec, secrets []string) {
3948 for _, secret := range secrets {
3949 if !containsSecret(podSpec.ImagePullSecrets, secret) {
3950 podSpec.ImagePullSecrets = append(podSpec.ImagePullSecrets, corev1.LocalObjectReference{Name: secret})
3951 }
3952 }
3953}
3954
3955func containsSecret(secrets []corev1.LocalObjectReference, secretName string) bool {
3956 for _, s := range secrets {

Callers 15

TransformToolkitFunction · 0.85
TransformDevicePluginFunction · 0.85
TransformDCGMExporterFunction · 0.85
TransformDCGMFunction · 0.85
TransformMIGManagerFunction · 0.85
TransformKataManagerFunction · 0.85
TransformVFIOManagerFunction · 0.85
TransformCCManagerFunction · 0.85

Calls 1

containsSecretFunction · 0.85

Tested by

no test coverage detected