mirror of
https://github.com/siderolabs/talos.git
synced 2025-09-11 17:01:20 +02:00
Instead of doing our homegrown "try all the endpoints" method, use gRPC load-balancing across configured endpoints. Generalize load-balancer via gRPC resolver we had in Talos API client, use it in remote certificate generator code. Generalized resolver is still under `machinery/`, as `pkg/grpc` is not in `machinery/`, and we can't depend on Talos code from `machinery/`. Related to: #3068 Full fix for #3068 requires dynamic updates to control plane endpoints while apid is running, this is coming in the next PR. Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
17 lines
488 B
Go
17 lines
488 B
Go
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
package client
|
|
|
|
import (
|
|
"github.com/talos-systems/talos/pkg/machinery/client/resolver"
|
|
"github.com/talos-systems/talos/pkg/machinery/constants"
|
|
)
|
|
|
|
var talosListResolverScheme string
|
|
|
|
func init() {
|
|
talosListResolverScheme = resolver.RegisterRoundRobinResolver(constants.ApidPort)
|
|
}
|