func CreateDatabaseClientServiceDNSNameWithDomain(deployment metav1.Object, domain *string) string {
	return appendDeploymentClusterDomain(CreateDatabaseClientServiceDNSName(deployment), domain)
}
CreateDatabaseClientServiceDNSNameWithDomain returns the DNS of the database client service.
package k8sutil
import (
	"fmt"
	core "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
func appendDeploymentClusterDomain(dns string, domain *string) string {
	if domain == nil || *domain == "" {
		return dns
	}
	return fmt.Sprintf("%s.%s", dns, *domain)
}
func CreatePodDNSName(deployment metav1.Object, role, id string) string {
	return fmt.Sprintf("%s.%s.%s.svc", CreatePodHostName(deployment.GetName(), role, id), CreateHeadlessServiceName(deployment.GetName()), deployment.GetNamespace())
}
func CreatePodDNSNameWithDomain(deployment metav1.Object, domain *string, role, id string) string {
	return appendDeploymentClusterDomain(CreatePodDNSName(deployment, role, id), domain)
}
func CreateServiceDNSName(svc *core.Service) string {
	return fmt.Sprintf("%s.%s.svc", svc.GetName(), svc.GetNamespace())
}
func CreateServiceDNSNameWithDomain(svc *core.Service, domain *string) string {
	return appendDeploymentClusterDomain(CreateServiceDNSName(svc), domain)
}