fix: removed port environment variable as it is no longer needed since host is not using an environment variable

This commit is contained in:
Andrey Melnikov
2020-08-17 16:14:30 -07:00
parent bcec3c13fd
commit 0274785f72

View File

@@ -1556,11 +1556,7 @@ with statistics about the workflow that was just executed.
*/ */
func getCURLNodeTemplate(name, curlMethod, curlPath, curlBody string, inputs wfv1.Inputs) (template *wfv1.Template, err error) { func getCURLNodeTemplate(name, curlMethod, curlPath, curlBody string, inputs wfv1.Inputs) (template *wfv1.Template, err error) {
host := "onepanel-core.onepanel.svc.cluster.local" host := "onepanel-core.onepanel.svc.cluster.local"
port := env.GetEnv("ONEPANEL_CORE_SERVICE_PORT", "80") port := "80"
if port == "" {
err = errors.New("ONEPANEL_CORE_SERVICE_PORT is empty.")
return
}
endpoint := fmt.Sprintf("http://%s:%s%s", host, port, curlPath) endpoint := fmt.Sprintf("http://%s:%s%s", host, port, curlPath)
template = &wfv1.Template{ template = &wfv1.Template{
Name: name, Name: name,