Skip to content

Commit

Permalink
Rebase changes
Browse files Browse the repository at this point in the history
  • Loading branch information
johnugeorge committed May 15, 2019
1 parent a2aa391 commit 4c2ae63
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 38 deletions.
19 changes: 9 additions & 10 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 0 additions & 28 deletions pkg/common/v1alpha2/common.go
Original file line number Diff line number Diff line change
@@ -1,37 +1,9 @@
package v1alpha2

import (
"os"

"k8s.io/apimachinery/pkg/runtime/schema"

experimentsv1alpha2 "github.com/kubeflow/katib/pkg/api/operators/apis/experiment/v1alpha2"
)

const (
KatibManagerServiceIPEnvName = "KATIB_MANAGER_PORT_6789_TCP_ADDR"
KatibManagerServicePortEnvName = "KATIB_MANAGER_PORT_6789_TCP_PORT"
KatibManagerServiceNamespaceEnvName = "KATIB_MANAGER_NAMESPACE"
KatibManagerService = "katib-manager"
KatibManagerPort = "6789"
ManagerAddr = KatibManagerService + ":" + KatibManagerPort
)

func GetManagerAddr() string {
ns := os.Getenv(experimentsv1alpha2.DefaultKatibNamespaceEnvName)
if len(ns) == 0 {
addr := os.Getenv(KatibManagerServiceIPEnvName)
port := os.Getenv(KatibManagerServicePortEnvName)
if len(addr) > 0 && len(port) > 0 {
return addr + ":" + port
} else {
return ManagerAddr
}
} else {
return KatibManagerService + "." + ns + ":" + KatibManagerPort
}
}

func GetSupportedJobList() []schema.GroupVersionKind {
supportedJobList := []schema.GroupVersionKind{
schema.GroupVersionKind{
Expand Down

0 comments on commit 4c2ae63

Please sign in to comment.