ingress-nginx: Support `grpc_read_timeout` and `grpc_send_timeout` in annotations
What do you want to happen?
We want to configure the grpc_read_timeout and grpc_send_timeout with annotations on ingress.
Since the server-snippet has some potential risk, we have to migrate all snippets to common annotations.
https://github.com/search?q=repo%3Akubernetes%2Fingress-nginx+path%3A%2F^internal\%2Fingress\%2Fannotations\%2F%2F+parser.AnnotationRiskCritical&type=code
Is there currently another issue associated with this?
https://github.com/kubernetes/ingress-nginx/issues/2475, but it’s inactive and closed.
Does it require a particular kubernetes version?
No
Solutions
1. Add new annotations, e.g.
...
annotations:
nginx.ingress.kubernetes.io/grpc_read_timeout: 3600
nginx.ingress.kubernetes.io/grpc_send_timeout: 3600
...
2. Set grpc_read_timeout and grpc_send_timeout with the same value in proxy_read_timeout
Similar like nginx-ingress-controller, just set grpc with proxy settings by default
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 17 (15 by maintainers)
Hi @strongjz , maybe this should be noted as breaking change in release notes for 1.11 Because we are using:
and after upgrade from 1.10 to 1.11 we ended up with these errors:
In the
/tmp/nginx/nginx-cfg658058193there really are duplicated directives for grpc (default values from annotations and our values from configuration-snippetWe will switch from snippet to annotations to fix this, but I think it’s better to know about this from release notes.
ok, the solution 1 would be safer – add new annotations, it doesn’t break the existing “configurations”, you can add new annotations and remove snippets at the same time.
how do you think? @tao12345666333 @longwuyuan
I raised issue #11866
Thank you, I know why it happend. Question is how should I know it before the upgrade? No any mentions to “check all your snippets or everything would be down” in changelogs.