Closed jgoodall closed 1 year ago
Given the lack of a response, I am going to ask this a different way. Something appears to have changed between arangojs
v7.8.0 and v8.0.0, but I do not see anything relevant in the migration guide. I dont see any option in the Database config to set something like a basePath
, but it appears that is what we may now need. I just do not see a way to set it.
This is how we set up the connection for the db
object in the arangojs
app:
export const db = new arangojs.Database({
url: "https://localhost/arangodb",
databaseName: "dbName"
})
Our ingress-nginx controller forwards everything with /arangodb
path prefix to the arango server. This is the kubernetes ingress config for that:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: db-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$1
nginx.ingress.kubernetes.io/configuration-snippet: |
proxy_set_header X-Script-Name /arangodb;
spec:
ingressClassName: nginx
rules:
- host: localhost
http:
paths:
- pathType: Prefix
path: /arangodb/?(.*)
backend:
service:
name: arangodb-cluster-ea
port:
number: 8529
tls:
- hosts:
- localhost
secretName: ingress-cert
Any pointers are appreciated!
We gave up on this, and took advantage of the fact that everything to the arangodb server starts with /_db
, so we set our path
prefix rule to /_db
and that works for version 8.0.0.
We deploy ArangoDB using
kube-arangodb
into a Kubernetes cluster. Access to the database is through ingress-nginx, which forwards data tohttps://<server>/arangodb
to the arango cluster, andhttps://<server>/
to our application (which uses thearangojs
library). Everything worked fine witharangojs
7.8.0. When we updated our app to 8.0.0, it stopped working. The only thing that changed is thearangojs
library and the handful of changes needed to compile the update.The application now seems to be trying to connect to
https://<server>/
instead ofhttps://<server>/arangodb/
- for example, a call to get the version of arangodb results in this request in 7.8.0:https://<server>/arangodb/_db/torro/_api/version?details=true
, but this in 8.0.0:https://<server>/_db/torro/_api/version?details=true
Do we need to set a
basePath
somewhere now? I dont see that as an option on thedatabase
configuration. And I am not seeing anything in the migration guide.Relevant info: