mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-28 03:53:33 +00:00
fix(dns): error message for ingress port without hostname and no cluster domain
This commit is contained in:
@@ -76,8 +76,8 @@ func (r *ServiceSpecResolver) expandIngressPorts(spec *api.ServiceSpec) error {
|
|||||||
|
|
||||||
if port.Hostname == "" {
|
if port.Hostname == "" {
|
||||||
if r.ClusterDomain == "" {
|
if r.ClusterDomain == "" {
|
||||||
return fmt.Errorf("cluster domain must be reserved to generate hostname for ingress port %s",
|
return fmt.Errorf("cluster domain must be reserved to generate hostname for ingress port: %d/%s",
|
||||||
port)
|
port.ContainerPort, port.Protocol)
|
||||||
}
|
}
|
||||||
// Assign the default hostname (service-name.cluster-domain).
|
// Assign the default hostname (service-name.cluster-domain).
|
||||||
spec.Ports[i].Hostname = fmt.Sprintf("%s.%s", spec.Name, r.ClusterDomain)
|
spec.Ports[i].Hostname = fmt.Sprintf("%s.%s", spec.Name, r.ClusterDomain)
|
||||||
|
|||||||
Reference in New Issue
Block a user