mirror of
https://github.com/rancher/rke.git
synced 2025-04-28 03:31:24 +00:00
Get certificates for active etcd servers only
This commit is contained in:
parent
e5c2c86b65
commit
c467584f8f
@ -63,7 +63,11 @@ func (c *Cluster) GetClusterState(ctx context.Context) (*Cluster, error) {
|
||||
if err := currentCluster.InvertIndexHosts(); err != nil {
|
||||
return nil, fmt.Errorf("Failed to classify hosts from fetched cluster: %v", err)
|
||||
}
|
||||
currentCluster.Certificates, err = getClusterCerts(ctx, c.KubeClient, currentCluster.EtcdHosts)
|
||||
activeEtcdHosts := currentCluster.EtcdHosts
|
||||
for _, inactiveHost := range c.InactiveHosts {
|
||||
activeEtcdHosts = removeFromHosts(inactiveHost, activeEtcdHosts)
|
||||
}
|
||||
currentCluster.Certificates, err = getClusterCerts(ctx, c.KubeClient, activeEtcdHosts)
|
||||
currentCluster.DockerDialerFactory = c.DockerDialerFactory
|
||||
currentCluster.LocalConnDialerFactory = c.LocalConnDialerFactory
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user