Render empty forwarders for forward zones
A forward zone with no forwarders now renders "forwarders { };", which
BIND accepts and treats as disabling forwarding for the zone.
This commit is contained in:
@@ -218,10 +218,7 @@ func (r *BindZoneReconciler) buildZoneConfig(ctx context.Context, zone *bindv1al
|
||||
parts = append(parts, fmt.Sprintf("primaries { %s }", terminateInline(zone.Spec.Primaries)))
|
||||
}
|
||||
case bindv1alpha1.ZoneForward:
|
||||
parts = append(parts, "type forward", "forward only")
|
||||
if len(zone.Spec.Forwarders) > 0 {
|
||||
parts = append(parts, fmt.Sprintf("forwarders { %s }", terminateInline(zone.Spec.Forwarders)))
|
||||
}
|
||||
parts = append(parts, "type forward", "forward only", bind.ForwardersClause(zone.Spec.Forwarders))
|
||||
case bindv1alpha1.ZoneStub:
|
||||
parts = append(parts, "type stub", fmt.Sprintf("file \"%s\"", bind.ZoneFilePath(zone.Spec.ZoneName)))
|
||||
if len(zone.Spec.Primaries) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user