Skip to content

Commit

Permalink
Update execute.go
Browse files Browse the repository at this point in the history
fix checks on URL
  • Loading branch information
dciangot authored Jun 26, 2024
1 parent b37535d commit b8da15c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/virtualkubelet/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ func getSidecarEndpoint(ctx context.Context, interLinkURL string, interLinkPort
interLinkEndpoint = interLinkURL
} else if strings.HasPrefix(interLinkURL, "http://") {
interLinkEndpoint = interLinkURL + ":" + interLinkPort
} else if strings.HasPrefix(interLinkURL, "https://") {
interLinkEndpoint = interLinkURL + ":" + interLinkPort
} else {
log.G(ctx).Fatal("Sidecar URL should either start per unix:// or http://")
log.G(ctx).Fatal("InterLink URL should either start per unix:// or http(s)://")
}
return interLinkEndpoint
}
Expand Down

0 comments on commit b8da15c

Please sign in to comment.