Skip to content

Commit 0bafa96

Browse files
authored
Merge pull request #109 from onepanelio/fix/show.model.serving.url
fix: add model serving url to output for microk8s
2 parents a69a30d + 35ca74b commit 0bafa96

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

util/kubectl.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ func PrintClusterNetworkInformation(c *kubernetes.Clientset, url string) {
286286
if yamlFile.HasKey("application.provider") {
287287
provider := yamlFile.GetValue("application.provider").Value
288288
if provider == "minikube" || provider == "microk8s" {
289+
domain := yamlFile.GetValue("application.domain").Value
289290
fqdn := yamlFile.GetValue("application.fqdn").Value
290291

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

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

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

0 commit comments

Comments
 (0)