provider-k3s/main.go
Nianyu Shen 153d95162a
fix: add log rotation and version in logging (#100)
* fix: add log rotation and version in logging

Signed-off-by: Nianyu Shen <xiaoyu9964@gmail.com>

* ci: use 22.04 ubuntu runner

Signed-off-by: Nianyu Shen <xiaoyu9964@gmail.com>

---------

Signed-off-by: Nianyu Shen <xiaoyu9964@gmail.com>
2025-01-27 21:43:30 -08:00

26 lines
563 B
Go

package main
import (
"github.com/kairos-io/kairos-sdk/clusterplugin"
"github.com/mudler/go-pluggable"
"github.com/sirupsen/logrus"
"github.com/kairos-io/provider-k3s/pkg/log"
"github.com/kairos-io/provider-k3s/pkg/provider"
)
func main() {
log.InitLogger("/var/log/provider-k3s.log")
plugin := clusterplugin.ClusterPlugin{
Provider: provider.ClusterProvider,
}
if err := plugin.Run(pluggable.FactoryPlugin{
EventType: clusterplugin.EventClusterReset,
PluginHandler: provider.HandleClusterReset,
}); err != nil {
logrus.Fatal(err)
}
}