Skip to content

feat(dns): NSX DNS record service and zone validation#1423

Open
wenyingd wants to merge 1 commit into
vmware-tanzu:mainfrom
wenyingd:dns-only
Open

feat(dns): NSX DNS record service and zone validation#1423
wenyingd wants to merge 1 commit into
vmware-tanzu:mainfrom
wenyingd:dns-only

Conversation

@wenyingd
Copy link
Copy Markdown
Contributor

@wenyingd wenyingd commented May 6, 2026

  1. Introduce a new nsx service to support creating/updating/deleting DNS records in NSX.
  2. Introduce mock types for DNS record related clients.

@wenyingd wenyingd requested a review from TaoZou1 May 6, 2026 04:59
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 6, 2026

Codecov Report

❌ Patch coverage is 89.11820% with 116 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.59%. Comparing base (ff79596) to head (c882eb5).

Files with missing lines Patch % Lines
pkg/nsx/services/dns/recordservice.go 79.62% 34 Missing and 20 partials ⚠️
pkg/nsx/services/dns/store.go 94.19% 7 Missing and 6 partials ⚠️
pkg/nsx/services/dns/compare.go 84.00% 9 Missing and 3 partials ⚠️
pkg/nsx/services/dns/zones.go 88.77% 6 Missing and 5 partials ⚠️
pkg/nsx/services/common/wrap.go 73.33% 2 Missing and 2 partials ⚠️
pkg/nsx/services/dns/builder.go 94.73% 2 Missing and 2 partials ⚠️
pkg/nsx/services/dns/cleanup.go 73.33% 2 Missing and 2 partials ⚠️
pkg/nsx/services/dns/contributing.go 94.59% 2 Missing and 2 partials ⚠️
pkg/nsx/services/dns/initialize.go 88.57% 2 Missing and 2 partials ⚠️
pkg/clean/clean.go 71.42% 1 Missing and 1 partial ⚠️
... and 2 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1423      +/-   ##
==========================================
+ Coverage   77.02%   77.59%   +0.56%     
==========================================
  Files         156      169      +13     
  Lines       22048    23108    +1060     
==========================================
+ Hits        16983    17930     +947     
- Misses       3859     3926      +67     
- Partials     1206     1252      +46     
Flag Coverage Δ
unit-tests 77.59% <89.11%> (+0.56%) ⬆️
Files with missing lines Coverage Δ
pkg/nsx/client.go 93.42% <100.00%> (+0.11%) ⬆️
pkg/nsx/services/common/policy_tree.go 86.48% <100.00%> (+0.24%) ⬆️
pkg/nsx/services/common/types.go 100.00% <ø> (ø)
pkg/nsx/services/dns/errors.go 100.00% <100.00%> (ø)
pkg/nsx/services/dns/types.go 100.00% <100.00%> (ø)
pkg/third_party/externaldns/endpoint/endpoint.go 100.00% <100.00%> (ø)
pkg/util/utils.go 87.12% <100.00%> (+0.12%) ⬆️
pkg/clean/clean.go 86.88% <71.42%> (-0.95%) ⬇️
pkg/third_party/externaldns/endpoint/utils.go 90.47% <90.47%> (ø)
pkg/third_party/externaldns/provider/zonefinder.go 90.90% <90.90%> (ø)
... and 9 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wenyingd wenyingd force-pushed the dns-only branch 8 times, most recently from 0825801 to 7f460a0 Compare May 12, 2026 02:16
@wenyingd wenyingd force-pushed the dns-only branch 4 times, most recently from 944694e to d5459d9 Compare May 14, 2026 11:40
TaoZou1
TaoZou1 previously approved these changes May 15, 2026
Comment thread pkg/nsx/services/dns/recordservice.go
@TaoZou1
Copy link
Copy Markdown
Contributor

TaoZou1 commented May 15, 2026

Please add enough UT later.

@wenyingd wenyingd force-pushed the dns-only branch 2 times, most recently from ebdc0d8 to 236e7bf Compare May 15, 2026 06:01
@wenyingd wenyingd requested a review from TaoZou1 May 15, 2026 06:44
- Implement DNSRecordService for NSX ProjectDnsRecord CRUD operations
- Validate hostnames against VPCNetworkConfiguration allowed DNS zones
- Wrap hostname-mismatch error as DNSZoneValidationError for accurate
  DNSRecordReady condition reporting

Co-authored-by: Cursor <cursoragent@cursor.com>
@wenyingd
Copy link
Copy Markdown
Contributor Author

/e2e

@dantingl dantingl requested a review from heypnus May 18, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants