nanocl icon indicating copy to clipboard operation
nanocl copied to clipboard

RFC: DnsRule

Open leon3s opened this issue 1 year ago • 1 comments

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

leon3s avatar Apr 22 '23 14:04 leon3s

I'll start something on https://github.com/nxthat/nanocl/pull/235

leon3s avatar Apr 23 '23 11:04 leon3s