get rid of arrays in the kuberesources;

use shorter form of checking for errors
This commit is contained in:
Murat Kabilov
2017-05-12 11:41:26 +02:00
parent abd313f2d9
commit 416dace289
6 changed files with 167 additions and 170 deletions
+3 -5
View File
@@ -137,16 +137,14 @@ func (c *Cluster) waitPodLabelsReady() error {
})
}
func (c *Cluster) waitClusterReady() error {
func (c *Cluster) waitStatefulsetPodsReady() error {
// TODO: wait for the first Pod only
err := c.waitStatefulsetReady()
if err != nil {
if err := c.waitStatefulsetReady(); err != nil {
return fmt.Errorf("Statuful set error: %s", err)
}
// TODO: wait only for master
err = c.waitPodLabelsReady()
if err != nil {
if err := c.waitPodLabelsReady(); err != nil {
return fmt.Errorf("Pod labels error: %s", err)
}