* Refactor provider init This moves provider init out of vkubelet setup, instead preferring to initialize vkubelet with a provider. * Split API server configuration from setup. This makes sure that configuration (which is done primarily through env vars) is separate from actually standing up the servers. This also makes sure to abort daemon initialization if the API servers are not able to start.
23 lines
428 B
Go
23 lines
428 B
Go
// +build !no_sfmesh_provider
|
|
|
|
package register
|
|
|
|
import (
|
|
"github.com/virtual-kubelet/virtual-kubelet/providers"
|
|
"github.com/virtual-kubelet/virtual-kubelet/providers/sfmesh"
|
|
)
|
|
|
|
func init() {
|
|
register("sfmesh", sfmeshInit)
|
|
}
|
|
|
|
func sfmeshInit(cfg InitConfig) (providers.Provider, error) {
|
|
return sfmesh.NewSFMeshProvider(
|
|
cfg.ResourceManager,
|
|
cfg.NodeName,
|
|
cfg.OperatingSystem,
|
|
cfg.InternalIP,
|
|
cfg.DaemonPort,
|
|
)
|
|
}
|