- // Write controller URL to stdout. Nothing else goes
- // to stdout, so this provides an easy way for a
- // calling script to discover the controller URL when
- // everything is ready.
- fmt.Fprintln(stdout, url)
+ // Write each cluster's controller URL to stdout.
+ // Nothing else goes to stdout, so this allows a
+ // calling script to determine when the cluster is
+ // ready to use, and the controller's host:port (which
+ // may have been dynamically assigned depending on
+ // config/options).
+ for _, cc := range super.Clusters() {
+ fmt.Fprintln(stdout, cc.Services.Controller.ExternalURL)
+ }