TykTechnologies / tyk-k8s

Kubernetes ingress controller and sidecar injector for Tyk API Gateway
https://tyk.io
Other
7 stars 5 forks source link

Updates to other rules than the first one are not applied #37

Closed excieve closed 4 years ago

excieve commented 4 years ago

Function which checks whether there are any ingress spec changes only inspects the first item in the rules list: https://github.com/TykTechnologies/tyk-k8s/blob/1193b04e62692a9cccb5ec64a610c1aaf28f29a2/ingress/ingress.go#L341

joshblakeley commented 4 years ago

We actually ignore all rules than the first one altogether at the moment when templating the APIDefs.

So currently we create an API per path defined but they will both share the same custom domain. There needs to be a feature enhancement ticket to add support for templating apis per domain and then per path as the multiple rules are iterated through.

excieve commented 4 years ago

@joshblakeley doAdd ranges over the rules and inspects paths of each rule: https://github.com/TykTechnologies/tyk-k8s/blob/1193b04e62692a9cccb5ec64a610c1aaf28f29a2/ingress/ingress.go#L215

joshblakeley commented 4 years ago

Ahhh great. Don't know why I thought otherwise!

joshblakeley commented 4 years ago

fixed by #40