Alejandro Mery
|
57e1077a85
|
cluster: add MkdirAll() support
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
5a3d483f98
|
cluster: refactor Machine.ReadFile() and Machine.OpenFile()
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
884b11d1f9
|
cluster: sort regions, for `jpictl dump`' sake
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
5bbe15ef24
|
cluster: move SortRegions() from dns to cluster
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
fd1c57d377
|
cluster: introduce Cluster.ReadLines()
reading a file, splitting and trimming lines, and
allowing # to comment a line out
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
2fd5947f1b
|
cluster: introduce Cluster.WriteStringFile()
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
14b3d91191
|
cluster: introduce Cluster.RemoveFile()
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
abe3005769
|
dns: sort zones when writing data
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
e5639b2f4e
|
cluster: generate ring keys on scan if missing
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
543824a54a
|
cluster: allow empty wgN.conf files as markers to enable the ring
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
142ea00577
|
wireguard: fix KeyPair.Validate()
PrivateKey and PublicKey are now fixed length arrays,
so testing for len 0 is invalid
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
052f89152c
|
jpictl/dns: introduce add command to register new machines
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
557f156579
|
dns: refactor asSyncRecords()
for direct access of the unsorted map
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
9da49f2d86
|
dns/show: sort records
v2: change Name to lower case and Type to upper case before comparing
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
356322bc94
|
dns/show: introduce writeRecords() helper
to print a whole []libdns.Record
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
7dac96f474
|
dns/show: refactor Record formatting
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
440dcde50a
|
jpictl: introduce `jpictl dns show` command
to list dns entries
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
b0f4be7047
|
dns: refactor GetRecords() to allow commands other than sync
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
986db350b4
|
cluster: make unreachable panic explicit
making revive 1.3.4 happy
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
99ae34e98c
|
chore: update darvaza.org/core to v0.10.0
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
dd585b0fa2
|
dns: add Sync() mechanism to update A/AAAA records on the DNS provider
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
172752ab90
|
dns: add RecordSetter and RecordAppender to Provider
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
1a47985bd7
|
dns: Manager.WriteTo() generates BIND config, fully qualifies
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
f5ea72740c
|
dns: introduce initial DNS Manager
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
357c85dc1a
|
dns: SortRegions() by ISO3166
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
00aec477a4
|
dns: DefaultDNSProvider() using CLOUDFLARE_DNS_API_TOKEN
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
e0d8592dc1
|
dns: introduce AddrRecord{} to abstract A/AAAA entries
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
c397ca29ac
|
cluster: introduce Region interators
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
6e7f24f491
|
cluster: ensure ceph monitors are set when loading a config file
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
c702d649e0
|
cluster: introduce Regions to group zones
only available via config-file
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
1c199ed923
|
jpictl: update all hosts files on jpictl write
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
5dc5c95aa1
|
hosts: add generators for hosts files
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
70008e0ead
|
cluster: NewFromConfig() trying JSON and YAML
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
ec2b30c1e7
|
cluster: add DirFS() using hackpadfs/os
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
d0b0698c10
|
cluster: make domain, basedir and cluster name public fields
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
2a2e6c121e
|
cluster: group default option factories
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
24059dc9ee
|
cluster: rename Zones to Cluster
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
bedf62977f
|
cluster: move Machines to a dedicated file
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
5abb4c2f92
|
cluster: rename pkg/zones to pkg/cluster
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
204f3a49a1
|
drop toml support
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
32046fc1ec
|
zones: fix `jpictl dump` by explicitly omitting Machine.logger and Zone.logger
if they were fields, as in Zones, they would be ignored automatically.
but they aren't
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
2016b27707
|
zones: add structured logs to zone scanning
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
c038ad4431
|
zones: warn but not fail when scanning finds unknown monitors
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
6a071ba5f0
|
zones: ignore unknown wireguard endpoints
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
3e90e3ab1e
|
zones: ErrUnknownNode and ErrInvalidNode
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
90dd0c1239
|
zones: ignore machine-less zones
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
033ca2f20e
|
zones: validate Machine names
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
1bca1f7da1
|
zones: add logger to Zone and Machine
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
5e5958d22e
|
zones: introduce (private) logger interface
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |
Alejandro Mery
|
45447275a7
|
zones: introduce WithLogger() scan option
Signed-off-by: Alejandro Mery <amery@jpi.io>
|
1 year ago |