mirror of
https://github.com/kairos-io/provider-kairos.git
synced 2025-09-16 15:19:46 +00:00
@@ -95,17 +95,19 @@ func Bootstrap(e *pluggable.Event) pluggable.EventResponse {
|
|||||||
return ErrorEvent("Failed setup: %s", err.Error())
|
return ErrorEvent("Failed setup: %s", err.Error())
|
||||||
}
|
}
|
||||||
return pluggable.EventResponse{}
|
return pluggable.EventResponse{}
|
||||||
} else if tokenNotDefined {
|
}
|
||||||
|
|
||||||
|
if tokenNotDefined {
|
||||||
return ErrorEvent("No network token provided, or `k3s` block configured. Exiting")
|
return ErrorEvent("No network token provided, or `k3s` block configured. Exiting")
|
||||||
}
|
}
|
||||||
|
|
||||||
// We might still want a VPN, but not to route traffic into
|
// We might still want a VPN, but not to route traffic into
|
||||||
if kairosBlockisDefined && (!providerConfig.Kairos.Hybrid || providerConfig.Kairos.HybridVPN) {
|
if !providerConfig.Kairos.Hybrid || providerConfig.Kairos.HybridVPN {
|
||||||
logger.Info("Configuring VPN")
|
logger.Info("Configuring VPN")
|
||||||
if err := SetupVPN(services.EdgeVPNDefaultInstance, cfg.APIAddress, "/", true, providerConfig); err != nil {
|
if err := SetupVPN(services.EdgeVPNDefaultInstance, cfg.APIAddress, "/", true, providerConfig); err != nil {
|
||||||
return ErrorEvent("Failed setup VPN: %s", err.Error())
|
return ErrorEvent("Failed setup VPN: %s", err.Error())
|
||||||
}
|
}
|
||||||
} else if kairosBlockisDefined {
|
} else {
|
||||||
logger.Info("Configuring API")
|
logger.Info("Configuring API")
|
||||||
if err := SetupAPI(cfg.APIAddress, "/", true, providerConfig); err != nil {
|
if err := SetupAPI(cfg.APIAddress, "/", true, providerConfig); err != nil {
|
||||||
return ErrorEvent("Failed setup VPN: %s", err.Error())
|
return ErrorEvent("Failed setup VPN: %s", err.Error())
|
||||||
|
Reference in New Issue
Block a user