mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
move makeHostUrl to gce_instances (only used there)
This commit is contained in:
parent
2d5d301669
commit
41318d7596
@ -67,6 +67,11 @@ func getZone(n *v1.Node) string {
|
||||
return zone
|
||||
}
|
||||
|
||||
func makeHostURL(projectsApiEndpoint, projectID, zone, host string) string {
|
||||
host = canonicalizeInstanceName(host)
|
||||
return projectsApiEndpoint + strings.Join([]string{projectID, "zones", zone, "instances", host}, "/")
|
||||
}
|
||||
|
||||
// ToInstanceReferences returns instance references by links
|
||||
func (gce *GCECloud) ToInstanceReferences(zone string, instanceNames []string) (refs []*compute.InstanceReference) {
|
||||
for _, ins := range instanceNames {
|
||||
|
@ -732,11 +732,6 @@ func nodeNames(nodes []*v1.Node) []string {
|
||||
return ret
|
||||
}
|
||||
|
||||
func makeHostURL(projectsApiEndpoint, projectID, zone, host string) string {
|
||||
host = canonicalizeInstanceName(host)
|
||||
return projectsApiEndpoint + strings.Join([]string{projectID, "zones", zone, "instances", host}, "/")
|
||||
}
|
||||
|
||||
func hostURLToComparablePath(hostURL string) string {
|
||||
idx := strings.Index(hostURL, "/zones/")
|
||||
if idx < 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user