Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/controllers/external-dns/externaldns_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func (r *ExternalDNSReconciler) SetupWithManager(mgr ctrl.Manager) error {
Watches(&core.Secret{}, secretToEdns).
Build(r)
if err != nil {
klog.Error("failed to build controller.", err.Error())
klog.ErrorS(err, "failed to build controller")
return err
}

Expand Down
14 changes: 7 additions & 7 deletions pkg/plan/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,27 +263,27 @@ func SetDNSRecords(ctx context.Context, edns *api.ExternalDNS) ([]api.DNSRecord,

endpointsSource, err := createEndpointsSource(ctx, cfg)
if err != nil {
klog.Error(err.Error())
klog.ErrorS(err, "failed to create endpoints source")
return nil, err
}

domainFilter := createDomainFilter(cfg)

pvdr, err := buildProvider(ctx, cfg, domainFilter)
if err != nil {
klog.Error(err.Error())
klog.ErrorS(err, "failed to build provider")
return nil, err
}

reg, err := createRegistry(cfg, pvdr)
if err != nil {
klog.Errorln(err)
klog.ErrorS(err, "failed to create registry")
return nil, err
}

dnsRecs, err := createAndApplyPlan(ctx, cfg, reg, endpointsSource, domainFilter)
if err != nil {
klog.Errorln(err)
klog.ErrorS(err, "failed to apply plan")
return nil, err
}

Expand Down Expand Up @@ -389,8 +389,8 @@ func createAndApplyPlan(ctx context.Context, cfg *externaldns.Config, r registry
}

pln = pln.Calculate()
klog.Info("Desired: ", pln.Desired)
klog.Info("Current: ", pln.Current)
klog.V(2).InfoS("plan computed", "desired", len(pln.Desired), "current", len(pln.Current))
klog.V(4).InfoS("plan endpoints", "desired", pln.Desired, "current", pln.Current)

dnsRecs := make([]api.DNSRecord, 0)

Expand All @@ -402,7 +402,7 @@ func createAndApplyPlan(ctx context.Context, cfg *externaldns.Config, r registry
if pln.Changes.HasChanges() {
err = r.ApplyChanges(ctx, pln.Changes)
if err != nil {
klog.Error(err.Error())
klog.ErrorS(err, "failed to apply changes")
return nil, err
}
klog.Info("plan applied")
Expand Down
Loading