resolve_record_name

Function resolve_record_name 

Source
pub fn resolve_record_name(
    annotations: &BTreeMap<String, String>,
    host: &str,
    zone: &str,
) -> Result<String>
Expand description

Resolves the DNS record name for an ARecord, in priority order:

  1. bindy.firestoned.io/record-name annotation — explicit override (e.g. "myapp", "@")
  2. Derived from host by stripping the zone suffix (see derive_record_name)

When the override annotation is present, the host is not validated against the zone: the operator has explicitly chosen the record name and is responsible for its correctness. The override’s syntax is still checked by [validate_record_name_override], because the value reaches a zone file and the annotation is tenant-writable (audit finding P2-7).

§Errors

Returns an error when the override is present but is not a legal DNS name, or — when no override is set — the error from derive_record_name if the host does not belong to the zone.