mirror of
https://github.com/kairos-io/provider-kairos.git
synced 2025-09-13 22:00:08 +00:00
commit before using cursor
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
This commit is contained in:
@@ -49,8 +49,8 @@ func Bootstrap(e *pluggable.Event) pluggable.EventResponse {
|
||||
tokenNotDefined := (p2pBlockDefined && prvConfig.P2P.NetworkToken == "") || !p2pBlockDefined
|
||||
skipAuto := p2pBlockDefined && !prvConfig.P2P.Auto.IsEnabled()
|
||||
|
||||
worker, _ := p2p.NewK8sWorker(prvConfig)
|
||||
if prvConfig.P2P == nil && worker == nil {
|
||||
sd, _ := p2p.NewServiceDefinition(prvConfig)
|
||||
if prvConfig.P2P == nil && sd == nil {
|
||||
return pluggable.EventResponse{State: fmt.Sprintf("no kubernetes distribution configuration. nothing to do: %s", cfg.Config)}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ func Bootstrap(e *pluggable.Event) pluggable.EventResponse {
|
||||
// Do onetimebootstrap if a Kubernetes distribution is enabled.
|
||||
// Those blocks are not required to be enabled in case of a kairos
|
||||
// full automated setup. Otherwise, they must be explicitly enabled.
|
||||
if (tokenNotDefined && worker != nil) || skipAuto {
|
||||
if (tokenNotDefined && sd != nil) || skipAuto {
|
||||
err := oneTimeBootstrap(logger, prvConfig, func() error {
|
||||
return SetupVPN(services.EdgeVPNDefaultInstance, cfg.APIAddress, "/", true, prvConfig)
|
||||
})
|
||||
@@ -134,6 +134,18 @@ func Bootstrap(e *pluggable.Event) pluggable.EventResponse {
|
||||
Role: common.RoleAuto,
|
||||
RoleHandler: role.Auto(c, prvConfig),
|
||||
},
|
||||
service.RoleKey{
|
||||
Role: common.RoleControlPlane,
|
||||
RoleHandler: p2p.ControlPlane(c, prvConfig, common.RoleControlPlane),
|
||||
},
|
||||
service.RoleKey{
|
||||
Role: common.RoleMasterInit,
|
||||
RoleHandler: p2p.ControlPlane(c, prvConfig, common.RoleControlPlaneClusterInit),
|
||||
},
|
||||
service.RoleKey{
|
||||
Role: common.RoleMasterHA,
|
||||
RoleHandler: p2p.ControlPlane(c, prvConfig, common.RoleControlPlaneHA),
|
||||
},
|
||||
),
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user