mirror of
https://github.com/hanzo-ml/katib.git
synced 2026-09-24 00:31:27 +00:00
fix(metrics-collector): Use StrictValidation for RemoteImage call (#2583)
Signed-off-by: Andrey Velichkevich <[email protected]>
This commit is contained in:
committed by
GitHub
parent
cd572d8692
commit
db9a6624cd
@@ -66,7 +66,7 @@ func getPrimaryContainerIndex(containers []v1.Container, primaryContainerName st
|
||||
func getRemoteImage(pod *v1.Pod, namespace string, containerIndex int) (crv1.Image, error) {
|
||||
// verify the image name, then download the remote config file
|
||||
c := pod.Spec.Containers[containerIndex]
|
||||
ref, err := name.ParseReference(c.Image, name.WeakValidation)
|
||||
ref, err := name.ParseReference(c.Image, name.StrictValidation)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to parse image %q: %v", c.Image, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user