mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Fail fast when image is specified w/o tag
This commit is contained in:
parent
41505f7109
commit
89b50bcf94
@ -373,6 +373,9 @@ func ReplaceRegistryInImageURL(imageURL string) (string, error) {
|
||||
}
|
||||
}
|
||||
last := strings.SplitN(parts[countParts-1], ":", 2)
|
||||
if len(last) == 1 {
|
||||
return "", fmt.Errorf("image %q is required to be in an image:tag format", imageURL)
|
||||
}
|
||||
config := getRepositoryMappedConfig(index, Config{
|
||||
registry: parts[0],
|
||||
name: strings.Join([]string{strings.Join(parts[1:countParts-1], "/"), last[0]}, "/"),
|
||||
|
Loading…
Reference in New Issue
Block a user