-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
push headless endpoint change when headless enabled or dns is enabled #42165
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,8 +38,7 @@ func ConfigAffectsProxy(req *model.PushRequest, proxy *model.Proxy) bool { | |
// When endpoints for headless service change, we should push if EnableHeadlessService is true | ||
// so that we create updated listeners or when DNSCapture is enabled for proxy so that the NDS | ||
// table is updated. | ||
if req.Full && len(req.Reason) == 1 && req.Reason[0] == model.HeadlessEndpointUpdate && | ||
(features.EnableHeadlessService || bool(proxy.Metadata.DNSCapture)) { | ||
if req.Full && headlessEndpointsUpdated(req) && (features.EnableHeadlessService || bool(proxy.Metadata.DNSCapture)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This may introduce additional full push when EnableHeadlessService = false, actually in this case we only need NDS and EDS? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But we push NDS only on full push - so this is needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about updating There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But is n't it the same if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The diff is make full = false and you can set reason = HeadlessEndpoint. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can make full = false because it is needed when EnableHeadlessService is enabled. But changed a bit - hopefully this is better. PTAL |
||
return true | ||
} | ||
|
||
|
@@ -65,6 +64,15 @@ func ConfigAffectsProxy(req *model.PushRequest, proxy *model.Proxy) bool { | |
return false | ||
} | ||
|
||
func headlessEndpointsUpdated(req *model.PushRequest) bool { | ||
for _, reason := range req.Reason { | ||
if reason == model.HeadlessEndpointUpdate { | ||
return true | ||
} | ||
} | ||
return false | ||
} | ||
|
||
func checkProxyDependencies(proxy *model.Proxy, config model.ConfigKey, push *model.PushContext) bool { | ||
// Detailed config dependencies check. | ||
switch proxy.Type { | ||
|
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.
I am not sure I am following.. since this checks
Full && ...
, wouldn't we push it anyways? The only way we would filter is if it was filtered out by a Sidecar, but in that case we really don't want to push?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.
Are you saying full pushes are always pushed? But when we pushConnection, do not we call this for every proxy?
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.
No, it isn't always, but ConfigAffectsProxy scopes based on Sidecar which seems fine...?
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.
I have changed it a bit. Hopefully that should address this part. PTAL and let me know.