File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,14 +327,17 @@ func (sc *StackContainer) stackHostnames(
327327
328328 // Old-style autogenerated hostnames
329329 for _ , host := range spec .GetHosts () {
330- if strings .HasSuffix (host , sc .perStackDomain ) {
331- result .Insert (fmt .Sprintf ("%s.%s" , sc .Name (), sc .perStackDomain ))
332- } else {
333- log .Debugf (
334- "Ingress host: %s suffix did not match cluster-domain %s" ,
335- host ,
336- sc .perStackDomain ,
337- )
330+ for _ , domain := range sc .clusterDomains {
331+ if strings .HasSuffix (host , domain ) {
332+ // generate the per-stack hostname using the per-stack domain suffix
333+ result .Insert (fmt .Sprintf ("%s.%s" , sc .Name (), sc .perStackDomain ))
334+ } else {
335+ log .Debugf (
336+ "Ingress host: %s suffix did not match cluster-domain %s" ,
337+ host ,
338+ sc .perStackDomain ,
339+ )
340+ }
338341 }
339342 }
340343 return result .List (), nil
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ type StackContainer struct {
8989 // Fields from the parent stackset
9090 stacksetName string
9191 scaledownTTL time.Duration
92+ clusterDomains []string
9293 perStackDomain string
9394
9495 // Ingress annotations to synchronize
@@ -354,6 +355,7 @@ func (ssc *StackSetContainer) UpdateFromResources() error {
354355 sc .syncAnnotationsInRouteGroup = syncAnnotationsInRouteGroup
355356 sc .backendPort = backendPort
356357 sc .scaledownTTL = scaledownTTL
358+ sc .clusterDomains = ssc .clusterDomains
357359 sc .perStackDomain = ssc .perStackDomain
358360 err := sc .updateStackResources ()
359361 if err != nil {
You can’t perform that action at this time.
0 commit comments