Skip to content

Commit

Permalink
Merge pull request #109 from onepanelio/fix/show.model.serving.url
Browse files Browse the repository at this point in the history
fix: add model serving url to output for microk8s
  • Loading branch information
Vafilor authored Aug 30, 2021
2 parents a69a30d + 35ca74b commit 0bafa96
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions util/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ func PrintClusterNetworkInformation(c *kubernetes.Clientset, url string) {
if yamlFile.HasKey("application.provider") {
provider := yamlFile.GetValue("application.provider").Value
if provider == "minikube" || provider == "microk8s" {
domain := yamlFile.GetValue("application.domain").Value
fqdn := yamlFile.GetValue("application.fqdn").Value

hostsPath := "/etc/hosts"
Expand All @@ -297,11 +298,12 @@ func PrintClusterNetworkInformation(c *kubernetes.Clientset, url string) {
fmt.Printf("\nIn your %v file, add\n", hostsPath)
fmt.Printf(" %v %v\n", clusterIP, fqdn)

if config.Spec.HasLikeComponent("kfserving") {
domain := yamlFile.GetValue("application.domain").Value
defaultNamespace := yamlFile.GetValue("application.defaultNamespace").Value
modelServingURL := fmt.Sprintf("sys-storage-%v.%v", defaultNamespace, domain)
defaultNamespace := yamlFile.GetValue("application.defaultNamespace").Value
sysStorageURL := fmt.Sprintf("sys-storage-%v.%v", defaultNamespace, domain)
fmt.Printf(" %v %v\n", clusterIP, sysStorageURL)

if config.Spec.HasLikeComponent("kfserving") {
modelServingURL := fmt.Sprintf("serving.%v", domain)
fmt.Printf(" %v %v\n", clusterIP, modelServingURL)
}

Expand Down

0 comments on commit 0bafa96

Please sign in to comment.