-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip fully qualified names when replacing images names #566
Conversation
@jonjohnsonjr That's a good idea. |
if removed != "host:1234/user/container" { | ||
t.Errorf("Tag vas not removed from an image name with port: %s ", removed) | ||
func TestSplitTag(t *testing.T) { | ||
var tests = []struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test case for digest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be done now!
pkg/skaffold/deploy/kubectl.go
Outdated
return re.ReplaceAllString(image, "") | ||
func splitTag(image string) (string, string) { | ||
re := regexp.MustCompile(`(.*):([^/]+)$`) | ||
matches := re.FindStringSubmatch(image) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be a little more robust to reuse the name parsing utilities here: https://github.com/google/go-containerregistry/blob/master/name/ref.go
Fix GoogleContainerTools#565 Signed-off-by: David Gageot <[email protected]>
Signed-off-by: David Gageot <[email protected]>
Signed-off-by: David Gageot <[email protected]>
Signed-off-by: David Gageot <[email protected]>
No description provided.