5 stable releases
Uses new Rust 2024
| new 2025.12.9 | Dec 8, 2025 |
|---|---|
| 2025.10.18 | Oct 17, 2025 |
| 2025.3.4 | Mar 12, 2025 |
| 2024.11.22 | Nov 26, 2024 |
#259 in #kubernetes
27KB
451 lines
externaldns
This lib implenments External-DNS webhook interface. External-DNS uses this interface to communicate with non-built-in DNS service provider.
The first thing to care is:
trait Provider {
async fn domain_filter(&self) -> Result<DomainFilter>;
async fn records(&self) -> Result<Vec<Endpoint>>;
async fn apply_changes(&self, changes: Changes) -> Result<()>;
async fn adjust_endpoints(&self, endpoints: Vec<Endpoint>) -> Result<Vec<Endpoint>> {
Ok(endpoints)
}
}
The implementor must implement the first three functioons.
domain_filter tells External-DNS the rules to match the domains that this provider takes care.
records tells External-DNS all records the provider currently solves.
External-DNS tells apply_changes what (records) to CUD.
With this implementor, and an optional Status implementor, one can Webhook::new() to get a Webhook instance, then Webhook::start() to get everything working.
For more reference, please checkout the example, which is a fully functioned provider for DNSMasq, which I am using in my K3S.
Ref: webhook-provider.md
Dependencies
~21–37MB
~571K SLoC