I have followed basic Knative setup recomended by official
So now i have:
- minikube on WSL2
- kourier
- knative
After that I have simple python script on top of Flask to listen POST method and access external url like
Current observation:
- Python script works well under docker dry-run;
- Python script works if address specified by explicit IP: under Knative triggering by
curl -X POST -H "host..." http:/127.0.0.1" -H "Content-Type: application/json" -d '{"url":"http://192.168.1.1"}'
- Pythin script fails if url contains names aka
curl -X POST -H "host..." http:/127.0.0.1" -H "Content-Type: application/json" -d '{"url":";}'
:
Failed to fetch URL: HTTPConnectionPool(host='example', port=80): Max retries exceeded with url: / (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fe471b0a900>: Failed to resolve 'example' ([Errno -5] Name has no usable address)"))"
What I have already tried to do:
- Per official doc: networking.knative.dev/http-protocol: "enabled"
- Also allow HTTP 1.1 duplex (don't think it is ever relevant).
metadata:
annotations:
features.knative.dev/http-full-duplex: "Enabled"