-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dns): Rewrite dns persistence to allow virtual-outbound to be added #2484
feat(dns): Rewrite dns persistence to allow virtual-outbound to be added #2484
Conversation
Currently the persisted state on the vips was very restraining. With the addition of virtual-outbounds we'll need something more flexible This migrates the state to a new format that will be extensible. Signed-off-by: Charly Molter <charly.molter@konghq.com>
1188d51
to
7d7785c
Compare
This avoids computing the same thing twice. Now that allocator persists the correct configuration we can just reuse this Signed-off-by: Charly Molter <charly.molter@konghq.com>
1f3f318
to
952b21e
Compare
…bound_dnspersistence Signed-off-by: Charly Molter <charly.molter@konghq.com>
Codecov Report
@@ Coverage Diff @@
## master #2484 +/- ##
=======================================
Coverage 52.28% 52.28%
=======================================
Files 865 866 +1
Lines 48098 48130 +32
=======================================
+ Hits 25147 25165 +18
- Misses 20919 20926 +7
- Partials 2032 2039 +7
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks great! I guess it's a lot of hard work to refactor/improve this part of the codebase. Thanks! I have few comments, mostly about naming, but overall it totally makes sense to me
pkg/dns/vips/virtual_outbound.go
Outdated
oldVob, ok := vo.byHostname[entry] | ||
if ok { | ||
if !oldVob.Equal(vob) { | ||
changes = append(changes, Change{Type: Modify, Entry: entry}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How Modify
can happen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we add a new outbound (for example same host but different port).
b2a03a7
to
386edb8
Compare
Signed-off-by: Charly Molter <charly.molter@konghq.com>
…bound_dnspersistence Signed-off-by: Charly Molter <charly.molter@konghq.com>
Currently the persisted state on the vips was very restraining.
With the addition of virtual-outbounds we'll need something more flexible
This migrates the state to a new format that will be extensible.
It also avoids reusing vips straight away which might avoid some issues when services are added and removed at once.