nanocl
nanocl copied to clipboard
RFC: DnsRule
Is your feature request related to a problem? Please describe. To fully unlock the control of the network, we need to think about a spec for the dns controller. By default we use DNSMASQ
First the data type :
Type: Resource
ApiVersion: v0.5
Resources:
- Name: resource-example
Kind: DnsRule
Version: v0.1
Config:
Network: "Public" | "Private" | "Nsp.{namespace_name}" # To bind to specific namespace ip address
Entries:
- Name: test.com
IpAddress: "127.0.0.1" | "Nsp.{namespace_name}" # To redirect to specific namespace ip address
We should handle two methods:
-
PUT /rules
to create new / update a DnsRule -
DELETE /rules/{Name}
to delete the DnsRule
Creating a rule mean creating a file in this case, nothing have to be stored in database. That mean we have to create specific dnsmasq config for given resource.
The service should generate an openapi spec aswell.
Feel free to share any though about the config spec for the DnsRule
I'll start something on https://github.com/nxthat/nanocl/pull/235