Skip to content

Commit

Permalink
Merge pull request #61 from rabin-io/patch-1
Browse files Browse the repository at this point in the history
Fix NS line for the zone file
  • Loading branch information
kubevirt-bot committed Sep 19, 2023
2 parents 64799ca + 5e2942a commit 0238ab5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/zonemgr/internal/zone-file-cache/zone_file_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (zoneFileCache *ZoneFileCache) generateHeaderSuffix() {
zoneFileCache.headerSuf = fmt.Sprintf(" %s %s %s %s)\n", refresh, retry, expire, ttl)

if zoneFileCache.nameServerIP != "" {
zoneFileCache.headerSuf += fmt.Sprintf("IN NS %s.\n", zoneFileCache.nameServerName)
zoneFileCache.headerSuf += fmt.Sprintf("@ IN NS %s.\n", zoneFileCache.nameServerName)
zoneFileCache.headerSuf += fmt.Sprintf("%s IN A %s\n", nameServerDefault, zoneFileCache.nameServerIP)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var _ = Describe("cached zone file content maintenance", func() {
Describe("cached zone file initialization", func() {
const (
headerDefault = "$ORIGIN vm. \n$TTL 3600 \n@ IN SOA ns.vm. email.vm. (0 3600 3600 1209600 3600)\n"
headerCustomFmt = "$ORIGIN vm.%s. \n$TTL 3600 \n@ IN SOA ns.vm.%s. email.vm.%s. (0 3600 3600 1209600 3600)\nIN NS ns.vm.%s.\nns IN A %s\n"
headerCustomFmt = "$ORIGIN vm.%s. \n$TTL 3600 \n@ IN SOA ns.vm.%s. email.vm.%s. (0 3600 3600 1209600 3600)\n@ IN NS ns.vm.%s.\nns IN A %s\n"
headerSoaSerial = "$ORIGIN vm. \n$TTL 3600 \n@ IN SOA ns.vm. email.vm. (12345 3600 3600 1209600 3600)\n"
)

Expand Down

0 comments on commit 0238ab5

Please sign in to comment.