Skip to content

Commit

Permalink
Merge pull request #49 from galal-hussein/check_etcd_hosts
Browse files Browse the repository at this point in the history
Fix check for etcd hosts
  • Loading branch information
galal-hussein authored Nov 26, 2017
2 parents b204a2d + 50826bf commit 8f77e50
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cluster/hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ func (c *Cluster) SetUpHosts() error {
}

func CheckEtcdHostsChanged(kubeCluster, currentCluster *Cluster) error {
etcdChanged := hosts.IsHostListChanged(currentCluster.EtcdHosts, kubeCluster.EtcdHosts)
if etcdChanged {
return fmt.Errorf("Adding or removing Etcd nodes is not supported")
if currentCluster != nil {
etcdChanged := hosts.IsHostListChanged(currentCluster.EtcdHosts, kubeCluster.EtcdHosts)
if etcdChanged {
return fmt.Errorf("Adding or removing Etcd nodes is not supported")
}
}
return nil
}
Expand Down

0 comments on commit 8f77e50

Please sign in to comment.