Open gogojlb opened 8 months ago
This issue is currently awaiting triage.
If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
/remove-kind bug
@gogojlb its possible that your issue-description is too cryptic and succint
I am not a developer so I do not understand the use case of a HTTPS variable in the configMap but I was hoping to reproduce and actually understand the reproduced problem in the context of knowing ;
Reason being first we deprecated fpm support, after a survey that supported deprecation decision. Then someone said they use it & want it so we reverted and got confirmation that fcgi for fpm feature was working. And this issue is a report that something is wrong with that feature. Now there are not too many resources available to look into this so the simplification of the issue description actually goes a long way in triaging
/triage needs-information
/assign
Hi @longwuyuan , thanks for your attention to this issue and sorry for the confusion. Let me clarify it a bit.
it is not the fcgi functionality itself that is at issue here, but just ingress/configmap objects validation.
I'm assuming that ingress-nginx supports the same set of fcgi parameters as plain nginx.
In that case, while parameter values specified with if_not_empty
are valid from nginx/ngx_http_fastcgi_module perspective, they are not valid from nginx-ingress perspective due strict validation regex that doesn't allow a space.
err="fcgi contains invalid key or value" configmap="test-fcgi" namespace="test-fcgi" key="HTTPS" value="$https if_not_empty"
If my assumptions are correct, I can also hypothesize that the problem can be solved by modifying the regexp to e.g. ^[A-Za-z0-9\-\_\$\{\}/.]*( if_not_empty){0,1}$
.
using a nginx:blah image which is a plain old nginx
It is just a dummy nginx deployment to provide target for the ingress/service.
Ah thanks for the clarification. Helps a lot.
I am not a developer so cant say for sure but I think the fcgi parameters will have been implemented in go or lua and thus less likely that all the parameters would be honored in a confgMap (specially one with a space). I will check to what limit I can but please don't wait for me.
Hoping someone else will have more helpful comments.
This is stale, but we won't close it automatically, just bare in mind the maintainers may be busy with other tasks and will reach your issue ASAP. If you have any question or request to prioritize this, please reach #ingress-nginx-dev
on Kubernetes Slack.
What happened: Fcgi parameter validation error:
Validation regex for fcgi values does't pass variables specified with
if_not_empty
What you expected to happen:
To be able to set fcgi variables specified with
if_not_empty
. Nginx doc referenceNGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
Kubernetes version (use
kubectl version
):Environment:
Cloud provider or hardware configuration: AWS EKS
How was the ingress-nginx-controller installed:
How to reproduce this issue: