From cd65632527c7e2998680b23039baeeee4ad1a699 Mon Sep 17 00:00:00 2001 From: Arlan Lloyd Date: Sun, 2 Nov 2025 03:30:31 +0000 Subject: [PATCH] allow for specifying middleware proxy root url --- chart/templates/_helpers.tpl | 8 ++++++++ chart/templates/scanner/deployment.yaml | 2 +- chart/values.yaml | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index d378fdb9..8fb022c8 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -126,4 +126,12 @@ Create the name of the traefikproxy service account to use {{- else -}} {{ default "default" .Values.traefikproxy.serviceAccount.name }} {{- end -}} +{{- end -}} + +{{/* +Create kyoo middlewareproxy rootURL +rootURL does not include +*/}} +{{- define "kyoo.middlewareRootURL" -}} + {{ default (printf "http://%s" (include "kyoo.traefikproxy.fullname" .)) .Values.kyoo.middlewareRootURL }} {{- end -}} \ No newline at end of file diff --git a/chart/templates/scanner/deployment.yaml b/chart/templates/scanner/deployment.yaml index 7c11148c..a86e8cf3 100644 --- a/chart/templates/scanner/deployment.yaml +++ b/chart/templates/scanner/deployment.yaml @@ -57,7 +57,7 @@ spec: - name: LIBRARY_IGNORE_PATTERN value: {{ .Values.kyoo.libraryIgnorePattern | quote }} - name: KYOO_URL - value: "http://{{ include "kyoo.api.fullname" . }}:3567/api" + value: "{{ include "kyoo.middlewareRootURL" . }}/api" - name: JWKS_URL value: "http://{{ include "kyoo.auth.fullname" . }}:4568/.well-known/jwks.json" - name: JWT_ISSUER diff --git a/chart/values.yaml b/chart/values.yaml index 822e79c6..c035be12 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -79,6 +79,9 @@ global: kyoo: # The url you can use to reach your kyoo instance. This is used during oidc to redirect users to your instance. address: "https://kyoo.mydomain.com" + # base url for accessing kyoo microservices behind middleware proxy + # defaults to traefikproxy service unless specified otherwise + middlewareRootURL: ~ # new auth settings extraClaims: '{"permissions": ["core.read"], "verified": false}'