Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #70 from njhale/fix/local-gc
Browse files Browse the repository at this point in the history
Elide "local" records from purge set
  • Loading branch information
cjellick authored May 24, 2023
2 parents 17a4686 + 0b97ed3 commit d188d56
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/backend/purger.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ func (b *backend) purge() {
return
}

// Elide records for "local" FQDNs, these won't exist in the database but shouldn't be deleted.
localSuffix := ".local." + b.baseDomain
for pair := range recordsToDelete {
if strings.HasSuffix(pair.FQDN, localSuffix) {
delete(recordsToDelete, pair)
}
}

if len(recordsToDelete) == 0 {
logrus.Infof("Records purged from Route53: 0")
return
Expand Down

0 comments on commit d188d56

Please sign in to comment.