Skip to content

Commit 3e76edd

Browse files
authored
Merge pull request #55 from maleck13/remove-service-inst-label
remove unneeded label
2 parents 7ac4141 + f94ac8d commit 3e76edd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pkg/cmd/services.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import (
3737
"sort"
3838

3939
"github.com/aerogear/mobile-cli/pkg/cmd/output"
40-
"github.com/satori/go.uuid"
4140
"k8s.io/apimachinery/pkg/watch"
4241
)
4342

@@ -295,7 +294,6 @@ Run the "mobile get services" command from this tool to see which services are a
295294
}
296295

297296
validServiceName := clusterServiceClass.Spec.ExternalName
298-
sid := uuid.NewV4().String()
299297
extMeta := clusterServiceClass.Spec.ExternalMetadata.Raw
300298
var extServiceClass ExternalServiceMetaData
301299
if err := json.Unmarshal(extMeta, &extServiceClass); err != nil {
@@ -308,7 +306,6 @@ Run the "mobile get services" command from this tool to see which services are a
308306
Kind: "ServiceInstance",
309307
},
310308
ObjectMeta: metav1.ObjectMeta{
311-
Labels: map[string]string{"id": sid, "serviceName": extServiceClass.ServiceName},
312309
Namespace: ns,
313310
GenerateName: validServiceName + "-",
314311
},
@@ -364,7 +361,7 @@ Run the "mobile get services" command from this tool to see which services are a
364361
if noWait {
365362
return nil
366363
}
367-
w, err := sc.scClient.ServicecatalogV1beta1().ServiceInstances(ns).Watch(metav1.ListOptions{LabelSelector: "id=" + sid})
364+
w, err := sc.scClient.ServicecatalogV1beta1().ServiceInstances(ns).Watch(metav1.ListOptions{LabelSelector: "serviceName=" + validServiceName})
368365
if err != nil {
369366
return errors.WithStack(err)
370367
}

0 commit comments

Comments
 (0)