first compilable version

This commit is contained in:
ston1th 2021-03-07 12:24:34 +01:00
commit fc1912bfa9
10 changed files with 188 additions and 88 deletions

View file

@ -45,22 +45,23 @@ func NewLBController(cfg *config.Config, srv *api.Server, log logr.Logger) (call
cc.Info("leading", "id", cc.ID())
ips, err := db.GetIPs()
if err != nil {
cc.Error("error updating haproxy config", err)
cc.Error(err, "error updating haproxy config")
<-t.C
continue
}
addIPs(cc, n, ips)
cfg, err := cc.Get("config")
if err != nil {
cc.Error("error getting config key", err)
<-t.C
continue
}
// TODO
//cfg, err := cc.Get("config")
//if err != nil {
// cc.Error(err, "error getting config key")
// <-t.C
// continue
//}
var lbs haproxy.Config
err = ha.UpdateConfig(ctx, lbs)
if err != nil {
cc.Error("error updating haproxy config", err)
cc.Error(err, "error updating haproxy config")
<-t.C
continue
}