Emit warning in case of label having multiple TTLs
An RRSet (=label) consisting of multiple records with different TTLs is
something not supported by most providers, and should be avoided.
Furthermore it is deprecated in rfc2181#section-5.2
Emit a warning for now during validation, eventually turning it into a full-blown error.
Fixes
@@ -573,7 +573,7 @@ func checkLabelHasMultipleTTLs(records []*models.RecordConfig) (errs []error) {
for _, r := range records {
label := fmt.Sprintf("%s %s", r.GetLabelFQDN(), r.Type)
- // if we have more records for a given label, append their TTLs here
+ // collect the TTLs at this label.
m[label] = append(m[label], r.TTL)
}
