-
Notifications
You must be signed in to change notification settings - Fork 373
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
Add fqdnCacheMinTTL configuration parameter #6808
Merged
+214
−41
Merged
Changes from 8 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
346988f
initial commit for implementing minTTL
hkiiita 66e72f1
auto generated antrea yml files
hkiiita d92246f
Refactored minTTL confgiyration and use.
hkiiita 2c58ad2
Merge branch 'antrea-io:main' into fqdn-cache-minttl
hkiiita e9e0286
update final assertion and comment for the test.
hkiiita dd43d6b
move minTTL validation to parent function and rename to fqdnCacheMinTTL
hkiiita 7de5ee7
add tests for FQDNCacheMinTTL functionality and made other changes as…
hkiiita fb28bba
re-grouped imports
hkiiita 6c6dcc8
refactor to test just the parseDNSResponse
hkiiita b0548d5
update test to include IPv6 and doc strng change in config
hkiiita 19fa9e7
Update e2e test and fqdn test for pareseDnsResponse
hkiiita 0d86321
Merge branch 'main' into fqdn-cache-minttl
hkiiita 2b05275
refactor e2e test into 2 sub-tests and other small changes
hkiiita 2231173
Fix assertion and formatting issues
hkiiita 5b801c5
Merge branch 'main' into fqdn-cache-minttl
hkiiita 3287148
Refactor e2e test to include a waitFor time
hkiiita b1cdb6f
moved waitFor statements to place where FQDNCacheMinTTL is set
hkiiita e80d7bd
Disable IPv6 in mock fqdnController as default and other nit changes
hkiiita File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,6 +186,10 @@ kubeAPIServerOverride: "" | |
# -- Address of DNS server, to override the kube-dns Service. It's used to | ||
# resolve hostnames in a FQDN policy. | ||
dnsServerOverride: "" | ||
# -- The minTTL setting helps address the problem of applications caching DNS response IPs indefinitely. | ||
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. comment out of date |
||
# The Cluster administrators should configure this value, ideally setting it to be equal to or greater than the maximum TTL | ||
# value of the application's DNS cache. | ||
fqdnCacheMinTTL: 0 | ||
# -- IPv4 CIDR range used for Services. Required when AntreaProxy is disabled. | ||
serviceCIDR: "" | ||
# -- IPv6 CIDR range used for Services. Required when AntreaProxy is disabled. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
antoninbas marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,6 +155,11 @@ func (o *Options) validate(args []string) error { | |
return fmt.Errorf("nodeType %s requires feature gate ExternalNode to be enabled", o.config.NodeType) | ||
} | ||
|
||
// validate FqdnCacheMinTTL | ||
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. no need to have the comment as the code is obvious and the comment doesn't provide more information |
||
if o.config.FqdnCacheMinTTL < 0 { | ||
return fmt.Errorf("fqdnCacheMinTTL must be greater than or equal to 0") | ||
} | ||
|
||
if o.config.NodeType == config.ExternalNode.String() { | ||
o.nodeType = config.ExternalNode | ||
return o.validateExternalNodeOptions() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
s/The fqdnCacheMinTTL setting helps address/fqdnCacheMinTTL helps address
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.
@hkiiita not addressed correctly, the current sentence is not grammatically correct