[problem] unable to talk to Fn deployed behind k8s ingress controller
Closed this issue · 1 comments
denismakogon commented
Intro
The latest helm charts deploying Fn in a distributed mode.
In order to reduce the number of services to be exposed and IP addresses allocated, helm chart creates an ingress rules:
Rules:
Host Path Backends
---- ---- --------
api.fn.com
/ test-fn:80 (<none>)
lb.fn.com
/ test-fn:90 (<none>)
ui.fn.com
/flow test-fn-ui:3000 (<none>)
In order to talk to Fn the following HTTP request must be performed:
curl <ingress-controller-ip-address>:80/v2/apps -H 'Host: api.fn.com'
{"items":[]}
Problem
Fn CLI doesn't let developers specify Host
header for HTTP requests created internally.
Possible ways to solve this problem
So, the problem is not in CLI itself, but in fn_go
and API spec.
There's a need to add Host
header to the spec for each request definition as shown here
denismakogon commented
Didn't know that an ingress controller can be used as a proxy instance, closing.