feat: add FQDN and path template to assist URL helper

- Replace simple hostnames with fully qualified domain names
- Include namespace and cluster domain in assist service URLs
- Add /assist/%s path pattern for both enterprise and standard editions
- Ensures proper service discovery across Kubernetes namespaces

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
rjshrjndrn 2025-05-27 13:06:56 +02:00 committed by Rajesh Rajendran
parent bace9735df
commit 70dda4032a
3 changed files with 3 additions and 22 deletions

View file

@ -10,25 +10,6 @@ metadata:
{{- include "assist.labels" . | nindent 4 }}
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$1
nginx.ingress.kubernetes.io/configuration-snippet: |
#set $sticky_used "no";
#if ($sessionid != "") {
# set $sticky_used "yes";
#}
#add_header X-Debug-Session-ID $sessionid;
#add_header X-Debug-Session-Type "wss";
#add_header X-Sticky-Session-Used $sticky_used;
#add_header X-Upstream-Server $upstream_addr;
proxy_hide_header access-control-allow-headers;
proxy_hide_header Access-Control-Allow-Origin;
add_header 'Access-Control-Allow-Origin' $http_origin always;
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'sessionid, Content-Type, Authorization' always;
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
nginx.ingress.kubernetes.io/upstream-hash-by: $sessionid
{{- with .Values.ingress.annotations }}

View file

@ -59,7 +59,7 @@ spec:
- name: sourcemaps_reader
value: "http://sourcemapreader-openreplay.{{.Release.Namespace}}.{{.Values.global.clusterDomain}}:9000/%s/sourcemaps"
- name: ASSIST_URL
value: "http://assist-openreplay.{{.Release.Namespace}}.{{.Values.global.clusterDomain}}:9001/assist/%s"
value: {{- include "openreplay.assist_url" . }}
- name: ASSIST_JWT_SECRET
value: {{ .Values.global.assistJWTSecret }}
- name: JWT_SECRET

View file

@ -164,8 +164,8 @@ Create the volume mount config for redis TLS certificates
{{- define "openreplay.assist_url"}}
{{- if .Values.global.enterpriseEditionLicense }}
assist-api-openreplay:8080
"http://assist-api-openreplay.{{.Release.Namespace}}.{{.Values.global.clusterDomain}}:9001/assist/%s"
{{- else}}
assist-openreplay:8080
"http://assist-openreplay.{{.Release.Namespace}}.{{.Values.global.clusterDomain}}:9001/assist/%s"
{{- end}}
{{- end}}