Skip to content

Commit 7877331

Browse files
ivanmatmatioktalz
authored andcommitted
BUG/MINOR: ingress rule default frontend
In ingress rule management loop,the frontends list is modified by certain types of rules. Instead of being transient, the modification is kept for next loops thus causing issue.
1 parent 833b018 commit 7877331

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

controller/ingress/ingress.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ func (i *Ingress) HandleAnnotations(k store.K8s, cfg *configuration.ControllerCf
146146
annList = i.resource.Annotations
147147
ingressRule = true
148148
}
149-
frontends := []string{cfg.FrontHTTP, cfg.FrontHTTPS}
149+
defaultFrontends := []string{cfg.FrontHTTP, cfg.FrontHTTPS}
150+
frontends := defaultFrontends
150151
for _, a := range annotations.Frontend(i.resource, &result, *cfg.MapFiles) {
151152
err = a.Process(k, annList)
152153
if err != nil {
@@ -169,6 +170,8 @@ func (i *Ingress) HandleAnnotations(k store.K8s, cfg *configuration.ControllerCf
169170
case rules.REQ_RATELIMIT:
170171
limitRule := rule.(*rules.ReqRateLimit)
171172
cfg.RateLimitTables = append(cfg.RateLimitTables, limitRule.TableName)
173+
default:
174+
frontends = defaultFrontends
172175
}
173176
for _, frontend := range frontends {
174177
logger.Error(cfg.HAProxyRules.AddRule(rule, ingressRule, frontend))

0 commit comments

Comments
 (0)