[Release-1.21] Populate EtcdConfig in runtime from datastore when etcd is disabled (#5229)

* Populate EtcdConfig in runtime from datastore when etcd is disabled (#5222)

Fixes issue with secrets-encrypt rotate not having any etcd endpoints
available on nodes without a local etcd server.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>

* Revert to old Kine naming

Signed-off-by: Derek Nola <derek.nola@suse.com>

Co-authored-by: Brad Davidson <brad.davidson@rancher.com>
pull/5233/head
Derek Nola 2022-03-08 11:38:28 -08:00 committed by GitHub
parent 0ec1c41cd5
commit 3368116172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -65,6 +65,9 @@ func (c *Cluster) Start(ctx context.Context) (<-chan struct{}, error) {
logrus.Warnf("Failed to remove this node from etcd members")
}
c.config.Runtime.EtcdConfig.Endpoints = strings.Split(c.config.Datastore.Endpoint, ",")
c.config.Runtime.EtcdConfig.TLSConfig = c.config.Datastore.Config
return ready, nil
}