Commit af0bdc51 authored by jackgr's avatar jackgr

Fix TLS mismatch issue.

parent 64aea854
......@@ -113,7 +113,7 @@ func newManager(cp common.CredentialProvider) manager.Manager {
resolver := manager.NewTypeResolver(registryProvider, util.DefaultHTTPClient())
expander := manager.NewExpander(getServiceURL(*expanderURL, *expanderName, expanderPort), resolver)
deployer := manager.NewDeployer(getServiceURL(*deployerURL, *deployerName, deployerPort))
address := strings.TrimPrefix(getServiceURL(*mongoAddress, *mongoName, *mongoPort), "https://")
address := strings.TrimPrefix(getServiceURL(*mongoAddress, *mongoName, *mongoPort), "http://")
repository := createRepository(address)
return manager.NewManager(expander, deployer, repository, registryProvider, service, cp)
}
......@@ -136,7 +136,7 @@ func getServiceURL(serviceURL, serviceName, servicePort string) string {
log.Fatalf("cannot resolve service:%v. environment:%v\n", serviceName, os.Environ())
}
serviceURL = fmt.Sprintf("https://%s:%s", addrs[0], servicePort)
serviceURL = fmt.Sprintf("http://%s:%s", addrs[0], servicePort)
}
}
......@@ -149,7 +149,7 @@ func getServiceURL(serviceURL, serviceName, servicePort string) string {
func makeEnvVariableURL(str string) string {
prefix := makeEnvVariableName(str)
url := os.Getenv(prefix + "_PORT")
return strings.Replace(url, "tcp", "https", 1)
return strings.Replace(url, "tcp", "http", 1)
}
// makeEnvVariableName is copied from the Kubernetes source,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment