-
Notifications
You must be signed in to change notification settings - Fork 370
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
Implementation for minTTL #6808
base: main
Are you sure you want to change the base?
Changes from 1 commit
346988f
66e72f1
d92246f
2c58ad2
e9e0286
dd43d6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
antoninbas marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -155,13 +155,19 @@ func (o *Options) validate(args []string) error { | |||||
return fmt.Errorf("nodeType %s requires feature gate ExternalNode to be enabled", o.config.NodeType) | ||||||
} | ||||||
|
||||||
if o.config.NodeType == config.ExternalNode.String() { | ||||||
// validate FqdnCacheMinTTL | ||||||
if o.config.FqdnCacheMinTTL < 0 { | ||||||
return fmt.Errorf("fqdnCacheMinTTL set to an invalid value, its must be a positive integer") | ||||||
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.
Suggested change
|
||||||
} | ||||||
|
||||||
switch o.config.NodeType { | ||||||
case config.ExternalNode.String(): | ||||||
o.nodeType = config.ExternalNode | ||||||
return o.validateExternalNodeOptions() | ||||||
} else if o.config.NodeType == config.K8sNode.String() { | ||||||
case config.K8sNode.String(): | ||||||
o.nodeType = config.K8sNode | ||||||
return o.validateK8sNodeOptions() | ||||||
} else { | ||||||
default: | ||||||
return fmt.Errorf("unsupported nodeType %s", o.config.NodeType) | ||||||
Comment on lines
+163
to
171
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 is not a bad change, but I would avoid doing it in this PR as it is unrelated |
||||||
} | ||||||
} | ||||||
|
@@ -605,9 +611,6 @@ func (o *Options) validateK8sNodeOptions() error { | |||||
o.dnsServerOverride = hostPort | ||||||
} | ||||||
|
||||||
// Ensure that the minTTL is not negative. | ||||||
o.config.MinTTL = max(o.config.MinTTL, 0) | ||||||
|
||||||
if err := o.validateSecondaryNetworkConfig(); err != nil { | ||||||
return fmt.Errorf("failed to validate secondary network config: %v", err) | ||||||
} | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,7 +158,7 @@ type AgentConfig struct { | |
// The minTTL setting helps address the problem of applications caching DNS response IPs indefinitely. | ||
// 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. | ||
MinTTL int `yaml:"minTTL,omitempty"` | ||
FqdnCacheMinTTL int `yaml:"fqdnCacheMinTTL,omitempty"` | ||
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 the field name here should be |
||
// Cipher suites to use. | ||
TLSCipherSuites string `yaml:"tlsCipherSuites,omitempty"` | ||
// TLS min version. | ||
|
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.
This is why the manifests are not generated correctly (
fqdnCacheMinTTL:
instead offqdnCacheMinTTL: 0
)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.
Sorry , my bad. Will correct that.