Alejandro Mery
859e307ac4
rings: RingOnePrefix()/RingOneAddress()
...
Ring one designates the (virtual) local network of a zone
within a region.
Signed-off-by: Alejandro Mery <amery@jpi.io>
3 months ago
Alejandro Mery
52e1195139
rings: introduce generic ErrOutOfRange() factory
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
3 months ago
Alejandro Mery
378bab2f96
rings: introduce RegionID, ZoneID and NodeID
...
and a Valid() method to check if their value is within the
valid range.
Signed-off-by: Alejandro Mery <amery@jpi.io>
3 months ago
Alejandro Mery
3e90c7a30b
rings: introduce PrefixToRange()
...
returning the beginning and end of a subnet
Signed-off-by: Alejandro Mery <amery@jpi.io>
3 months ago
Alejandro Mery
50436a320c
rings: introduce AddrToU32() and AddrFromU32() helpers
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
3 months ago
Alejandro Mery
ac5827898b
rings: introduce subpackage to deal with Ring addresses
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
3 months ago
Alejandro Mery
fefbfa16a2
env: export ZONE{zoneID}_REGION
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
7986e0fd3b
env: add REGIONS list to output
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
3ba721bf7f
env: add []string writer
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
e410797413
env: use foo= instead of foo="" for empty variables
...
to improve readability
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
0158dc3a3c
cluster: add recursive RegionIterator to Zone
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
9226cf2dfd
cluster: introduce RegionIterator
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
173dba0c3b
cluster: decouple getRegion() from finishRegion()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
019143820f
cluster: remove k8s_token files from zones on write if found
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
d3bbe6d270
cluster: introduce Region.Cluster and m/{region}/k8s_token
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
7125e28b74
cluster: extend usage of the ZoneRegionsFileName constant
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
14686ff5a8
ceph: prevent osd label update on startup
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
6 months ago
Alejandro Mery
3c24e24d71
wireguard: switch from gcfg to asciigoat.org/ini/basic
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
6 months ago
Alejandro Mery
f64f4e08fe
cluster: remove unused variables on scan option factories
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
6 months ago
Alejandro Mery
00cf3959a2
cluster: load regions when scanning a directory
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
0db3e18227
cluster: introduce SyncRegions() to write regions file
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
0094450ca8
cluster: fix regions/zones mapping when the region exists
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
99998dc7e8
cluster: mark Machine as Inactive if the "region" file contains "none"
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
892d849740
cluster: introduce Machine.Inactive flag
...
if a Machine is Inactive, it won't be included on the DNS
aliases for the zone or it's regions.
v2:
- Machine.Active() renamed to Machine.IsActive()
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
125a4c0dbe
wireguard: implement EndpointAddress.UnmarshalText
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
7c811d7813
wireguard: implement UnmarshalText for PrivateKey and PublicKey
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
1580c09746
cluster: add Machine.ReadLines() shortcut
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
1492061ab8
jpictl: create machine directories on `jpictl write`
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
57e1077a85
cluster: add MkdirAll() support
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
5a3d483f98
cluster: refactor Machine.ReadFile() and Machine.OpenFile()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
884b11d1f9
cluster: sort regions, for `jpictl dump`' sake
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
5bbe15ef24
cluster: move SortRegions() from dns to cluster
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months 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>
10 months ago
Alejandro Mery
2fd5947f1b
cluster: introduce Cluster.WriteStringFile()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
14b3d91191
cluster: introduce Cluster.RemoveFile()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
abe3005769
dns: sort zones when writing data
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
e5639b2f4e
cluster: generate ring keys on scan if missing
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
543824a54a
cluster: allow empty wgN.conf files as markers to enable the ring
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months 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>
10 months ago
Alejandro Mery
052f89152c
jpictl/dns: introduce add command to register new machines
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
557f156579
dns: refactor asSyncRecords()
...
for direct access of the unsorted map
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months 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>
10 months ago
Alejandro Mery
356322bc94
dns/show: introduce writeRecords() helper
...
to print a whole []libdns.Record
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
7dac96f474
dns/show: refactor Record formatting
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
440dcde50a
jpictl: introduce `jpictl dns show` command
...
to list dns entries
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
b0f4be7047
dns: refactor GetRecords() to allow commands other than sync
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
986db350b4
cluster: make unreachable panic explicit
...
making revive 1.3.4 happy
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
99ae34e98c
chore: update darvaza.org/core to v0.10.0
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months 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>
11 months ago
Alejandro Mery
172752ab90
dns: add RecordSetter and RecordAppender to Provider
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
11 months ago