LightRAG/k8s-deploy/lightrag/templates/forwardauth-middleware.yaml
Taddeus a70ba1f75a
Phase 1: LightRAG Minimal Helm chart and documentation indexing using url references (#2)
* Partial implementation of phase-0

* Partial implementation of phase-1

* add report

* add postgress

* Revert "add postgress"

This reverts commit 27778dc6bb3906b5220dd386e47fe32ca7415332.

* remove junk

* Cleaned up annd setup docs

* update docs

* moved report

* Updated load_markdown_files function: Now returns tuples with (content, title, relative_path) instead of just (content, title)

* fixes to load docs script and more env variables for llm configuration

* update prod values

* update docs

* apolo docs support with linking

* update docs to reflect url conventions and mapping with docs

* Adds ingress and forwardAuth configurations

Adds ingress configuration to expose the application.

Adds forwardAuth configuration to enable user authentication.

Includes middleware to strip headers.

* Adds ingress and forward authentication middleware support
2025-06-23 20:04:34 +03:00

28 lines
No EOL
1.2 KiB
YAML

{{- if and .Values.ingress.enabled .Values.ingress.forwardAuth.enabled }}
apiVersion: traefik.io/v1alpha1 # Use traefik.containo.us/v1alpha1 if using older Traefik
kind: Middleware
metadata:
# Use the helper for the Middleware resource name
name: {{ .Values.ingress.forwardAuth.name | quote }}
# Middleware MUST be in the same namespace as the Ingress that uses it
namespace: {{ .Release.Namespace }}
labels:
{{- include "lightrag.labels" . | nindent 4 }}
spec:
forwardAuth:
# Required fields from values.yaml
address: {{ .Values.ingress.forwardAuth.address | quote }}
trustForwardHeader: {{ .Values.ingress.forwardAuth.trustForwardHeader | default true }}
# Optional headers to send to the authentication service
{{- if .Values.ingress.forwardAuth.authRequestHeaders }}
authRequestHeaders:
{{- toYaml .Values.ingress.forwardAuth.authRequestHeaders | nindent 6 }}
{{- end }}
# Optional headers to copy from the authentication service's response
{{- if .Values.ingress.forwardAuth.authResponseHeaders }}
authResponseHeaders:
{{- toYaml .Values.ingress.forwardAuth.authResponseHeaders | nindent 6 }}
{{- end }}
{{- end }}