Files
herolib/lib/threefold/tfgrid3deployer/webnames.v
mariobassem 17a67870ef WIP(tfgrid3deployer): Support deploying on hetzner nodes
- Add support for deploying VMs, ZDBs, and gateways on Hetzner nodes.
- Introduce `use_hetzner_node` flag to VM, ZDB, and WebName.
- Update `filter_nodes` to filter by Hetzner farm IDs if `on_hetzner` flag is set.
- Implement `get_hetzner_farm_ids` function (currently a placeholder).

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
2025-02-02 18:25:04 +02:00

30 lines
657 B
V

module tfgrid3deployer
import json
@[params]
pub struct WebNameRequirements {
pub mut:
name string @[required]
node_id ?u32
use_wireguard_network bool
use_hetzner_node bool
// must be in the format ip:port if tls_passthrough is set, otherwise the format should be http://ip[:port]
backend string @[required]
tls_passthrough bool
}
pub struct WebName {
pub mut:
fqdn string
name_contract_id u64
node_contract_id u64
requirements WebNameRequirements
node_id u32
}
// Helper function to encode a WebName
fn (self WebName) encode() ![]u8 {
return json.encode(self).bytes()
}