remove beta #12

This commit is contained in:
bakito 2021-08-08 10:15:29 +02:00
parent f2de32a2c1
commit aca26f449e
No known key found for this signature in database
GPG key ID: FAF93C1C384DD6B4
3 changed files with 19 additions and 27 deletions

View file

@ -13,13 +13,13 @@ Synchronize [AdGuardHome](https://github.com/AdguardTeam/AdGuardHome) config to
- Rewrites
- Services
- Clients
- DNS Config (BETA)
- DHCP Config (BETA)
- DNS Config
- DHCP Config
### Setup of initial instances
New AdGuardHome replica instances can be automatically installed if enabled via the config autoSetup.
During automatic installation, the admin interface will be listening on port 3000 in runtime.
New AdGuardHome replica instances can be automatically installed if enabled via the config autoSetup. During automatic
installation, the admin interface will be listening on port 3000 in runtime.
To skip automatic setup

View file

@ -147,20 +147,16 @@ func (w *worker) sync() {
return
}
if w.cfg.WithBeta("dns") {
o.dnsConfig, err = oc.DNSConfig()
if err != nil {
sl.With("error", err).Error("Error getting dns config")
return
}
o.dnsConfig, err = oc.DNSConfig()
if err != nil {
sl.With("error", err).Error("Error getting dns config")
return
}
if w.cfg.WithBeta("dhcp") {
o.dhcpServerConfig, err = oc.DHCPServerConfig()
if err != nil {
sl.With("error", err).Error("Error getting dhcp server config")
return
}
o.dhcpServerConfig, err = oc.DHCPServerConfig()
if err != nil {
sl.With("error", err).Error("Error getting dhcp server config")
return
}
replicas := w.cfg.UniqueReplicas()
@ -224,18 +220,14 @@ func (w *worker) syncTo(l *zap.SugaredLogger, o *origin, replica types.AdGuardIn
return
}
if w.cfg.WithBeta("dns") {
if err = w.syncDNS(o.accessList, o.dnsConfig, rc); err != nil {
rl.With("error", err).Error("Error syncing dns")
return
}
if err = w.syncDNS(o.accessList, o.dnsConfig, rc); err != nil {
rl.With("error", err).Error("Error syncing dns")
return
}
if w.cfg.WithBeta("dhcp") {
if err = w.syncDHCPServer(o.dhcpServerConfig, rc); err != nil {
rl.With("error", err).Error("Error syncing dns")
return
}
if err = w.syncDHCPServer(o.dhcpServerConfig, rc); err != nil {
rl.With("error", err).Error("Error syncing dns")
return
}
rl.Info("Sync done")

View file

@ -413,7 +413,7 @@ var _ = Describe("Sync", func() {
w.cfg = &types.Config{
Origin: types.AdGuardInstance{},
Replica: types.AdGuardInstance{URL: "foo"},
Beta: "dhcp,dns",
Beta: "",
}
// origin
cl.EXPECT().Host()