Kyoo/chart/templates/traefikproxy/configmap.yaml
2025-11-09 20:13:13 +01:00

59 lines
1.9 KiB
YAML

{{- if .Values.traefikproxy.enabled -}}
{{- if .Values.traefikproxy.defaultConfigmap -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "kyoo.traefikproxy.fullname" . }}
labels:
{{- include "kyoo.labels" (dict "context" . "component" .Values.traefikproxy.name "name" .Values.traefikproxy.name) | nindent 4 }}
{{- with (mergeOverwrite (deepCopy .Values.global.configmapAnnotations) .Values.traefikproxy.configmapAnnotations) }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
data:
# TODO: finish templating
# can probably remove host rules, since this will only be infront of Kyoo
# WILL ONLY SUPPORT WEB BY DEFAULT
# forwardAuth.address will be taken from $values.kyoo.address
dynamic_config.yaml: |
http:
routers:
phantomtest-basepath:
entryPoints:
- web
middlewares:
- phantomtest-api
service: phantomtest-api
rule: "Host(`pt2.bitey.life`) && PathPrefix(`/`)"
phantomtest-wellknown:
entryPoints:
- web
service: phantomtest-auth
rule: "Host(`pt2.bitey.life`) && PathPrefix(`/.well-known/`)"
phantomtest-auth:
entryPoints:
- web
service: phantomtest-auth
rule: "Host(`pt2.bitey.life`) && PathPrefix(`/auth`)"
middlewares:
phantomtest-api:
forwardAuth:
address: "http://pt2.bitey.life/auth/jwt"
authRequestHeaders:
- "Authorization"
- "X-Api-Key"
authResponseHeaders:
- Authorization
services:
phantomtest-api:
loadBalancer:
servers:
- url: http://phantomtest-api.phantomtest.svc.cluster.local:3000/
phantomtest-auth:
loadBalancer:
servers:
- url: http://phantomtest-auth.phantomtest.svc.cluster.local:8080/
{{- end }}
{{- end }}