-
Notifications
You must be signed in to change notification settings - Fork 374
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
Changes from 12 commits
346988f
66e72f1
d92246f
2c58ad2
e9e0286
dd43d6b
7de5ee7
fb28bba
6c6dcc8
b0548d5
19fa9e7
0d86321
2b05275
2231173
5b801c5
3287148
b1cdb6f
e80d7bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -187,6 +187,10 @@ kubeAPIServerOverride: "" | |
# -- Address of DNS server, to override the kube-dns Service. It's used to | ||
# resolve hostnames in a FQDN policy. | ||
dnsServerOverride: "" | ||
# fqdnCacheMinTTL helps address the issue of applications caching DNS response IPs beyond the TTL value for the DNS record. | ||
# It is used to enforce FQDN policy rules, ensuring that resolved IPs are included in datapath rules for as long as the application caches them. | ||
# Ideally, this value should be set to the maximum caching duration across all applications. | ||
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. ditto |
||
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. | ||
|
antoninbas marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4235,6 +4235,11 @@ data: | |
# 10.96.0.10:53, [fd00:10:96::a]:53). | ||
dnsServerOverride: "" | ||
|
||
# fqdnCacheMinTTL helps address the issue of applications caching DNS response IPs beyond the TTL value for the DNS record. | ||
# It is used to enforce FQDN policy rules, ensuring that resolved IPs are included in datapath rules for as long as the application caches them. | ||
# Ideally, this value should be set to the maximum caching duration across all applications. | ||
fqdnCacheMinTTL: 0 | ||
|
||
# Comma-separated list of Cipher Suites. If omitted, the default Go Cipher Suites will be used. | ||
# https://golang.org/pkg/crypto/tls/#pkg-constants | ||
# Note that TLS1.3 Cipher Suites cannot be added to the list. But the apiserver will always | ||
|
@@ -5383,8 +5388,8 @@ spec: | |
# Using "kubectl logs/exec/attach/cp" doesn't have to specify "-c antrea-agent" when troubleshooting. | ||
kubectl.kubernetes.io/default-container: antrea-agent | ||
# Automatically restart Pods with a RollingUpdate if the ConfigMap changes | ||
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments | ||
checksum/config: ee43fc8c8c5ac8097a757da0545e43b25f98d8f2d831842f7ee76e1ed7581267 | ||
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deploymentstl | ||
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 don't think this is an intentional change? 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. not addressed |
||
checksum/config: 31cdc841fb0d612699cc98337be81df9855876fe121c69caabfc7cb06ba7d6a5 | ||
labels: | ||
app: antrea | ||
component: antrea-agent | ||
|
@@ -5620,7 +5625,7 @@ spec: | |
annotations: | ||
# Automatically restart Pod if the ConfigMap changes | ||
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments | ||
checksum/config: ee43fc8c8c5ac8097a757da0545e43b25f98d8f2d831842f7ee76e1ed7581267 | ||
checksum/config: 31cdc841fb0d612699cc98337be81df9855876fe121c69caabfc7cb06ba7d6a5 | ||
labels: | ||
app: antrea | ||
component: antrea-controller | ||
|
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() | ||
|
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.
it would be good to wrap the lines here as well