Stock price should be displayed for when getting /stock/{stockId}, when the ticker is valid.
Actual Behavior
The response is always "stock not found for ticker : {stockId}".
Steps to Reproduce the Problem
Follow the instructions for Setup and Exploring in the README with a Knative cluster.
Try GET /stock/{stockId} for some real ticker (eg AAPL).
Additional Info
The root cause is that the app is unable to make connections outside of the cluster. You need to add a ServiceEntry with api.iextrading.com as a host for it to work, otherwise every external API call will fail.
/area test-and-release /kind bug /assign @will-cromar
Expected Behavior
Stock price should be displayed for when getting
/stock/{stockId}
, when the ticker is valid.Actual Behavior
The response is always "stock not found for ticker : {stockId}".
Steps to Reproduce the Problem
GET /stock/{stockId}
for some real ticker (eg AAPL).Additional Info
The root cause is that the app is unable to make connections outside of the cluster. You need to add a
ServiceEntry
withapi.iextrading.com
as a host for it to work, otherwise every external API call will fail.This service entry makes it work: