I am deploying a Jhipster app to a Kubernetes environment, and am using Istio for the networking.
Below is my VirtualService. Note that when the prefix
is set to /
, everything works fine. However I have several apps running on this cluster, so I need to map it to /mywebsite
.
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: ingress
spec:
hosts:
- "*"
gateways:
- mywebsite-gateway
http:
- match:
- uri:
prefix: /mywebsite
route:
- destination:
host: mywebsite
port:
number: 80
websocketUpgrade: true
When I access the app, I get these set of errors:
mywebsite:3 GET http://mywebsite.com:31380/app/vendor.bundle.js net::ERR_ABORTED 404 (Not Found)
manifest.bundle.js:55 Uncaught TypeError: Cannot read property 'call' of undefined
at __webpack_require__ (manifest.bundle.js:55)
at eval (app.main.ts?3881:1)
at Object../src/main/webapp/app/app.main.ts (main.bundle.js:447)
at __webpack_require__ (manifest.bundle.js:55)
at webpackJsonpCallback (manifest.bundle.js:26)
at main.bundle.js:1
__webpack_require__ @ manifest.bundle.js:55
eval @ app.main.ts?3881:1
./src/main/webapp/app/app.main.ts @ main.bundle.js:447
__webpack_require__ @ manifest.bundle.js:55
webpackJsonpCallback @ manifest.bundle.js:26
(anonymous) @ main.bundle.js:1
manifest.bundle.js:55 Uncaught TypeError: Cannot read property 'call' of undefined
at __webpack_require__ (manifest.bundle.js:55)
at eval (global.css?ca77:1)
at Object../node_modules/css-loader/index.js!./src/main/webapp/content/css/global.css (global.bundle.js:6)
at __webpack_require__ (manifest.bundle.js:55)
at eval (global.css?0a39:4)
at Object../src/main/webapp/content/css/global.css (global.bundle.js:13)
at __webpack_require__ (manifest.bundle.js:55)
at webpackJsonpCallback (manifest.bundle.js:26)
at global.bundle.js:1
__webpack_require__ @ manifest.bundle.js:55
eval @ global.css?ca77:1
./node_modules/css-loader/index.js!./src/main/webapp/content/css/global.css @ global.bundle.js:6
__webpack_require__ @ manifest.bundle.js:55
eval @ global.css?0a39:4
./src/main/webapp/content/css/global.css @ global.bundle.js:13
__webpack_require__ @ manifest.bundle.js:55
webpackJsonpCallback @ manifest.bundle.js:26
(anonymous) @ global.bundle.js:1
mywebsite:1 Unchecked runtime.lastError: The message port closed before a response was received.
I'm not sure why it is trying to go /app/vendor.bundle.js
. I think it should go to /mywebsite/app/vendor.bundle.js
. Although when I go to this page manually, I get a Your request cannot be processed
Also in my index.html
, I have <base href="./" />
, which had always been there ,as I read that as a possible solution.