Alejandro Mery
6e3bb24b36
cluster: further remove wg1 support
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
4 months ago
Alejandro Mery
9810f5c6c1
cluster: drop wg1.conf generation
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
4 months ago
Alejandro Mery
8948b6702a
Revert "cluster: fix wg1 generation (AllowedIPs)"
...
This reverts commit f0c09c2176
.
4 months ago
Nagy Károly Gábriel
f0c09c2176
cluster: fix wg1 generation (AllowedIPs)
...
Signed-off-by: Nagy Károly Gábriel <k@jpi.io>
4 months ago
Alejandro Mery
401603f4be
chore: clear lint warnings
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
4 months ago
Alejandro Mery
01ef75a020
cluster: fix wg0.conf generator
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
4 months ago
Alejandro Mery
7f5d48b2b0
cluster: rework `env` output to qualify zones using the region
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
4 months ago
Alejandro Mery
948eff76d3
cluster: migrate to using pkg/rings for Addresses
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
187149c129
cluster: decouple RingID from WireguardInterfaceID
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
982e16581c
cluster: pre-compute Zone's primary region
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
cede95e119
cluster: run initRegions() before scanZoneIDs()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
14e1c447c9
cluster: assign valid rings.RegionID to each primary region
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
99dece1e43
cluster: use rings.ZoneID and rings.NodeID types
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
5 months ago
Alejandro Mery
fefbfa16a2
env: export ZONE{zoneID}_REGION
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
8 months ago
Alejandro Mery
7986e0fd3b
env: add REGIONS list to output
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
8 months ago
Alejandro Mery
3ba721bf7f
env: add []string writer
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
8 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>
8 months ago
Alejandro Mery
0158dc3a3c
cluster: add recursive RegionIterator to Zone
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
8 months ago
Alejandro Mery
9226cf2dfd
cluster: introduce RegionIterator
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
8 months ago
Alejandro Mery
173dba0c3b
cluster: decouple getRegion() from finishRegion()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
8 months ago
Alejandro Mery
019143820f
cluster: remove k8s_token files from zones on write if found
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
8 months ago
Alejandro Mery
d3bbe6d270
cluster: introduce Region.Cluster and m/{region}/k8s_token
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
8 months ago
Alejandro Mery
7125e28b74
cluster: extend usage of the ZoneRegionsFileName constant
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
8 months ago
Alejandro Mery
f64f4e08fe
cluster: remove unused variables on scan option factories
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
9 months ago
Alejandro Mery
00cf3959a2
cluster: load regions when scanning a directory
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
0db3e18227
cluster: introduce SyncRegions() to write regions file
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
0094450ca8
cluster: fix regions/zones mapping when the region exists
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
99998dc7e8
cluster: mark Machine as Inactive if the "region" file contains "none"
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year 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>
1 year ago
Alejandro Mery
1580c09746
cluster: add Machine.ReadLines() shortcut
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
1492061ab8
jpictl: create machine directories on `jpictl write`
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
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
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
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
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