Skip to content

Commit

Permalink
Don't add http:// prefix for kubernetes services
Browse files Browse the repository at this point in the history
The host:port will become a http url if necessary in doPost in proxy.go.
However, adding the http:// here prevents GRPC from working.

Fixes stripe#762
  • Loading branch information
singron committed May 26, 2020
1 parent cd02f11 commit 978b4da
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ func (kd *KubernetesDiscoverer) GetDestinationsForService(serviceName string) ([
continue
}

// prepend with // so that it is a valid URL parseable by url.Parse
podIp := fmt.Sprintf("http://%s:%s", pod.Status.PodIP, forwardPort)
podIp := fmt.Sprintf("%s:%s", pod.Status.PodIP, forwardPort)
ips = append(ips, podIp)
}
return ips, nil
Expand Down

0 comments on commit 978b4da

Please sign in to comment.