forked from kubernetes/minikube
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathservice.go.rej
More file actions
29 lines (28 loc) · 1.15 KB
/
Copy pathservice.go.rej
File metadata and controls
29 lines (28 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff a/cmd/minikube/cmd/service.go b/cmd/minikube/cmd/service.go (rejected hunks)
@@ -163,18 +163,20 @@ You may select another namespace by using 'minikube service {{.service}} -n <nam
for _, svc := range noNodePortServices {
noNodePortSvcNames = append(noNodePortSvcNames, fmt.Sprintf("%s/%s", svc.Namespace, svc.Name))
}
- if len(noNodePortServices) != 0 {
+ if len(noNodePortServices) > 0 {
out.WarningT("Services {{.svc_names}} have type \"ClusterIP\" not meant to be exposed, however for local development minikube allows you to access this !", out.V{"svc_names": noNodePortSvcNames})
}
- if driver.NeedsPortForward(co.Config.Driver) && services != nil {
- startKicServiceTunnel(services, cname, co.Config.Driver)
+ if driver.NeedsPortForward(co.Config.Driver) {
+ svcs := services
+ if len(svcs) == 0 && len(noNodePortServices) > 0 {
+ svcs = noNodePortServices
+ }
+ if len(svcs) > 0 {
+ startKicServiceTunnel(svcs, cname, co.Config.Driver)
+ }
} else if !serviceURLMode {
openURLs(data)
- if len(noNodePortServices) != 0 {
- startKicServiceTunnel(noNodePortServices, cname, co.Config.Driver)
- }
-
}
},
}