Skip to content

Commit

Permalink
fix: since policy now logs what it would have done, it makes sense to…
Browse files Browse the repository at this point in the history
… do them after the endpoint filtering, so that the logs does not contain things that get filtered out anyway
  • Loading branch information
davhdavh authored Oct 30, 2024
1 parent 426ba9d commit 30a5274
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plan/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,6 @@ func (p *Plan) Calculate() *Plan {
}
}

for _, pol := range p.Policies {
changes = pol.Apply(changes)
}

// filter out updates this external dns does not have ownership claim over
if p.OwnerID != "" {
changes.Delete = endpoint.FilterEndpointsByOwnerID(p.OwnerID, changes.Delete)
Expand All @@ -257,6 +253,10 @@ func (p *Plan) Calculate() *Plan {
changes.UpdateNew = endpoint.FilterEndpointsByOwnerID(p.OwnerID, changes.UpdateNew)
}

for _, pol := range p.Policies {
changes = pol.Apply(changes)
}

plan := &Plan{
Current: p.Current,
Desired: p.Desired,
Expand Down

0 comments on commit 30a5274

Please sign in to comment.