more work done

This commit is contained in:
ston1th 2021-03-06 16:51:36 +01:00
commit 6fda229a8e
23 changed files with 384 additions and 177 deletions

View file

@ -6,11 +6,11 @@ import (
"os/signal"
"syscall"
"git.giftfish.de/ston1th/vipman/pkg/cluster"
"git.giftfish.de/ston1th/vipman/pkg/config"
"git.giftfish.de/ston1th/vipman/pkg/controller"
"git.giftfish.de/ston1th/vipman/pkg/etcd"
"git.giftfish.de/ston1th/vipman/pkg/raft"
"git.giftfish.de/ston1th/haproxy-lb/pkg/cluster"
"git.giftfish.de/ston1th/haproxy-lb/pkg/config"
"git.giftfish.de/ston1th/haproxy-lb/pkg/controller"
"git.giftfish.de/ston1th/haproxy-lb/pkg/etcd"
"git.giftfish.de/ston1th/haproxy-lb/pkg/raft"
"github.com/go-logr/logr"
"k8s.io/klog/v2"
"k8s.io/klog/v2/klogr"
@ -24,10 +24,10 @@ var (
func main() {
klog.InitFlags(nil)
flag.StringVar(&configFile, "config", "vipman.yaml", "vipman config file")
flag.StringVar(&configFile, "config", "haproxy-lb.yaml", "haproxy-lb config file")
flag.Parse()
log = klogr.New().WithName("main")
log.Info("starting vipman", "version", version)
log.Info("starting haproxy-lb", "version", version)
cfg, err := config.ParseFile(configFile)
if err != nil {
klog.Fatalf("init failed: %s", err)
@ -66,7 +66,7 @@ func main() {
sigs := make(chan os.Signal)
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
<-sigs
log.Info("vipman shutdown")
log.Info("haproxy-lb shutdown")
c.Stop()
log.Info("vipman stopped")
log.Info("haproxy-lb stopped")
}