HA working with k0s too

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
This commit is contained in:
Mauro Morales
2025-03-21 23:29:16 +01:00
parent b2a3963a5e
commit 0d18f69c1c
4 changed files with 33 additions and 5 deletions

View File

@@ -126,6 +126,13 @@ func ControlPlane(cc *config.Config, pconfig *providerConfig.Config, roleName st
c.Logger.Info("Running bootstrap before stage")
utils.SH(fmt.Sprintf("kairos-agent run-stage provider-kairos.bootstrap.before.%s", roleName)) //nolint:errcheck
if controlPlane.HA() {
err = controlPlane.SetupHAToken()
if err != nil {
return err
}
}
svc, err := controlPlane.Service()
if err != nil {
return fmt.Errorf("failed to get %s service: %w", controlPlane.Distro(), err)