This commit is contained in:
Mikaël Cluseau
2019-10-09 16:58:28 +11:00
parent ee2779cc9d
commit dde0ad6975
9 changed files with 238 additions and 51 deletions

View File

@ -100,3 +100,18 @@ func wsClusterSetPassword(req *restful.Request, resp *restful.Response) {
wsError(resp, err)
}
}
func wsClusterBootstrapPods(req *restful.Request, resp *restful.Response) {
cluster := wsReadCluster(req, resp)
if cluster == nil {
return
}
if len(cluster.BootstrapPods) == 0 {
log.Printf("cluster %q has no bootstrap pods defined", cluster.Name)
wsNotFound(req, resp)
return
}
resp.Write([]byte(cluster.BootstrapPods))
}