-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
enhancementNew feature or requestNew feature or request
Description
As mentioned in #258 (review), when constructing pod endpoints the cluster domain is hardcoded to the default cluster.local
. It could be nice to support a non-default value.
func StatefulSetPodFQDN(namespace, statefulSetName string, ordinal int, serviceName string) string {
// The DNS entry for a pod of a stateful set is
// $(statefulset name)-(ordinal).$(service name).$(namespace).svc.cluster.local
// https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id
//
// Ending that with a trailing "." to signify an absolute domain name
// https://datatracker.ietf.org/doc/html/rfc1034#section-3.1
return fmt.Sprintf("%v-%v.%v.%v.svc.cluster.local.",
statefulSetName,
ordinal,
serviceName,
namespace,
)
}
Kubernetes documentation: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request