-
Notifications
You must be signed in to change notification settings - Fork 459
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
Adding PodDNSConfig #3077
Adding PodDNSConfig #3077
Conversation
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.
LGTM
@@ -105,6 +105,8 @@ type OpAMPBridgeSpec struct { | |||
// https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ | |||
// +optional | |||
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` | |||
// PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy. |
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.
@yuriolisa should we also make it possible to configure DNSPolicy?
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.
@jaronoff97, actually not, because all the three possible values are contemplated here following the precedence.
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.
Just adding that I prefer this approach because it helps the end user avoid configuration mistakes.
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.
is there any other case where the user would want to set the DNSPolicy separately?
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.
IMO, no. It's just to offer a safe place to deliver the combination of HostNetwork, DNSPolicy, and DNSConfig.
dnsPolicy := corev1.DNSClusterFirst | ||
if hostNetwork { | ||
dnsPolicy = corev1.DNSClusterFirstWithHostNet | ||
} | ||
// If local DNS configuration is set, takes precedence of hostNetwork. | ||
if dnsConfig.Nameservers != nil { | ||
dnsPolicy = corev1.DNSNone |
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's also possible that someone would want to use nameservers but not have the DNSPolicy set to be None https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config though yeah this probably doesn't make a ton of sense... let's do this for now and if someone really wants the customization we can cross that bridge when we get to it.
Description:
Enabling PodDnsConfig for OpenTelemetry Collector, TargetAllocator and OpAMPBridge.
Link to tracking Issue(s):
Testing:
Documentation: