mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-04-07 00:15:23 +02:00
Merge 2322c59d24 into 8ed0bcf5ca
This commit is contained in:
commit
6fa4ad6b43
9 changed files with 328 additions and 22 deletions
29
helm/librechat-exporter/Chart.yaml
Normal file
29
helm/librechat-exporter/Chart.yaml
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
apiVersion: v2
|
||||||
|
name: librechat-exporter
|
||||||
|
description: A Prometheus metrics exporter for LibreChat
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
|
version: 0.1.0
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
|
# It is recommended to use it with quotes.
|
||||||
|
|
||||||
|
# renovate: image=ghcr.io/virtuos/librechat_exporter:main
|
||||||
|
appVersion: "2.0.6"
|
||||||
|
|
||||||
|
home: https://www.librechat.ai
|
||||||
|
sources:
|
||||||
|
- https://github.com/virtUOS/librechat_exporter
|
||||||
62
helm/librechat-exporter/templates/_helpers.tpl
Normal file
62
helm/librechat-exporter/templates/_helpers.tpl
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "librechat-exporter.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- define "librechat-exporter.fullname" -}}
|
||||||
|
{{- if $.Values.fullnameOverride }}
|
||||||
|
{{- $.Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||||
|
{{- if contains .Release.Name $name }}
|
||||||
|
{{- $name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "librechat-exporter.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "librechat-exporter.chart" . }}
|
||||||
|
{{ include "librechat-exporter.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Exporter selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "librechat-exporter.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "librechat-exporter.fullname" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "librechat-exporter.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create }}
|
||||||
|
{{- default (include "librechat-exporter.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else }}
|
||||||
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
83
helm/librechat-exporter/templates/deployment.yaml
Normal file
83
helm/librechat-exporter/templates/deployment.yaml
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "librechat-exporter.fullname" $ }}
|
||||||
|
labels:
|
||||||
|
{{- include "librechat-exporter.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "librechat-exporter.selectorLabels" . | nindent 6 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
{{- with .Values.podAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "librechat-exporter.labels" . | nindent 8 }}
|
||||||
|
{{- with .Values.podLabels }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.podSecurityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: {{ include "librechat-exporter.fullname" $ }}
|
||||||
|
{{- with .Values.securityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
{{- with .Values.env }}
|
||||||
|
env:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: {{ .Values.service.port }}
|
||||||
|
protocol: TCP
|
||||||
|
{{- with .Values.livenessProbe }}
|
||||||
|
livenessProbe:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.readinessProbe }}
|
||||||
|
readinessProbe:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.resources }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.volumeMounts }}
|
||||||
|
volumeMounts:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.extraContainers }}
|
||||||
|
{{ toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- with .Values.volumes }}
|
||||||
|
volumes:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
17
helm/librechat-exporter/templates/service.yaml
Normal file
17
helm/librechat-exporter/templates/service.yaml
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "librechat-exporter.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "librechat-exporter.labels" . | nindent 4 }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml .Values.service.annotations | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service.port }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
{{- include "librechat-exporter.selectorLabels" . | nindent 4 }}
|
||||||
21
helm/librechat-exporter/templates/service_monitor.yaml
Normal file
21
helm/librechat-exporter/templates/service_monitor.yaml
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{{- if .Values.serviceMonitor.enabled }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: {{ include "librechat-exporter.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "librechat-exporter.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.serviceMonitor.labels }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
endpoints:
|
||||||
|
- interval: {{ .Values.serviceMonitor.interval }}
|
||||||
|
path: /metrics
|
||||||
|
port: http
|
||||||
|
scheme: http
|
||||||
|
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "librechat-exporter.selectorLabels" . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
87
helm/librechat-exporter/values.yaml
Normal file
87
helm/librechat-exporter/values.yaml
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: virtuos/librechat_exporter
|
||||||
|
registry: ghcr.io
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
|
tag: main
|
||||||
|
|
||||||
|
env: []
|
||||||
|
# - name: MONGODB_URI
|
||||||
|
# value: "mongodb://mongodb:27017/"
|
||||||
|
# - name: LOGGING_LEVEL
|
||||||
|
# value: "info"
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
podAnnotations: {}
|
||||||
|
podLabels: {}
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
fsGroup: 2000
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
# readOnlyRootFilesystem: true # not supported yet
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 1000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 8000
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: http
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: http
|
||||||
|
|
||||||
|
# Additional volumes on the output Deployment definition.
|
||||||
|
volumes: []
|
||||||
|
# - name: foo
|
||||||
|
# secret:
|
||||||
|
# secretName: mysecret
|
||||||
|
# optional: false
|
||||||
|
|
||||||
|
# Additional volumeMounts on the output Deployment definition.
|
||||||
|
volumeMounts: []
|
||||||
|
# - name: foo
|
||||||
|
# mountPath: "/etc/foo"
|
||||||
|
# readOnly: true
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
extraContainers: {}
|
||||||
|
|
||||||
|
serviceMonitor:
|
||||||
|
enabled: false
|
||||||
|
interval: 30s
|
||||||
|
scrapeTimeout: 30s
|
||||||
|
labels: []
|
||||||
|
|
@ -44,3 +44,7 @@ dependencies:
|
||||||
version: "0.5.3"
|
version: "0.5.3"
|
||||||
condition: librechat-rag-api.enabled
|
condition: librechat-rag-api.enabled
|
||||||
repository: file://../librechat-rag-api
|
repository: file://../librechat-rag-api
|
||||||
|
- name: librechat-exporter
|
||||||
|
version: "0.1.0"
|
||||||
|
condition: librechat-exporter.enabled
|
||||||
|
repository: file://../librechat-exporter
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,14 @@ app.kubernetes.io/name: {{ include "librechat.fullname" . }}-rag
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Exporter selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "librechat-exporter.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "librechat-exporter.fullname" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Create the name of the service account to use
|
Create the name of the service account to use
|
||||||
*/}}
|
*/}}
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,15 @@
|
||||||
|
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
global:
|
global:
|
||||||
# default Secret for envs/ only Passwords. Can be locally generated with: kubectl create secret generic librechat-secret-envs --from-env-file=.env.example --dry-run=client -o yaml > secret-envs.yaml
|
# default Secret for envs/ only Passwords. Can be locally generated with: kubectl create secret generic librechat-secret-envs --from-env-file=.env.example --dry-run=client -o yaml > secret-envs.yaml
|
||||||
# For better maintainabillity, you can put all vars directly in the config Section and only overwrite Secrets with this if nessesary.
|
# For better maintainabillity, you can put all vars directly in the config Section and only overwrite Secrets with this if nessesary.
|
||||||
# Required Values:
|
# Required Values:
|
||||||
# - CREDS_KEY
|
# - CREDS_KEY
|
||||||
# - CREDS_IV
|
# - CREDS_IV
|
||||||
# - JWT_SECRET
|
# - JWT_SECRET
|
||||||
# - JWT_REFRESH_SECRET
|
# - JWT_REFRESH_SECRET
|
||||||
# - MEILI_MASTER_KEY
|
# - MEILI_MASTER_KEY
|
||||||
librechat:
|
librechat:
|
||||||
existingSecretName: "librechat-credentials-env"
|
existingSecretName: "librechat-credentials-env"
|
||||||
# Used for Setting the Right Key, can be something like AZURE_API_KEY, if Azure OpenAI is used
|
# Used for Setting the Right Key, can be something like AZURE_API_KEY, if Azure OpenAI is used
|
||||||
|
|
@ -115,6 +113,8 @@ librechat-rag-api:
|
||||||
# can be azure, openai, huggingface or huggingfacetei
|
# can be azure, openai, huggingface or huggingfacetei
|
||||||
embeddingsProvider: openai
|
embeddingsProvider: openai
|
||||||
|
|
||||||
|
librechat-exporter:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
image:
|
image:
|
||||||
repository: danny-avila/librechat
|
repository: danny-avila/librechat
|
||||||
|
|
@ -123,7 +123,6 @@ image:
|
||||||
# Overrides the image tag whose default is the chart appVersion.
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
tag: ""
|
tag: ""
|
||||||
|
|
||||||
|
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
nameOverride: ""
|
nameOverride: ""
|
||||||
fullnameOverride: ""
|
fullnameOverride: ""
|
||||||
|
|
@ -146,8 +145,6 @@ lifecycle: {}
|
||||||
# exec:
|
# exec:
|
||||||
# command: ["/bin/sh", "-c", "npm run update-banner <displayFrom(Format: yyyy-mm-ddTHH:MM:SSZ)> <displayTo(Format: yyyy-mm-ddTHH:MM:SSZ)> <message> <isPublic(true/false)>"]
|
# command: ["/bin/sh", "-c", "npm run update-banner <displayFrom(Format: yyyy-mm-ddTHH:MM:SSZ)> <displayTo(Format: yyyy-mm-ddTHH:MM:SSZ)> <message> <isPublic(true/false)>"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
podAnnotations: {}
|
podAnnotations: {}
|
||||||
podLabels: {}
|
podLabels: {}
|
||||||
deploymentAnnotations: {}
|
deploymentAnnotations: {}
|
||||||
|
|
@ -164,7 +161,7 @@ podSecurityContext:
|
||||||
securityContext:
|
securityContext:
|
||||||
capabilities:
|
capabilities:
|
||||||
drop:
|
drop:
|
||||||
- ALL
|
- ALL
|
||||||
# readOnlyRootFilesystem: true # not supported yet
|
# readOnlyRootFilesystem: true # not supported yet
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
runAsUser: 1000
|
runAsUser: 1000
|
||||||
|
|
@ -204,7 +201,6 @@ resources: {}
|
||||||
# cpu: 100m
|
# cpu: 100m
|
||||||
# memory: 128Mi
|
# memory: 128Mi
|
||||||
|
|
||||||
|
|
||||||
autoscaling:
|
autoscaling:
|
||||||
enabled: false
|
enabled: false
|
||||||
minReplicas: 1
|
minReplicas: 1
|
||||||
|
|
@ -257,7 +253,7 @@ hostAliases: []
|
||||||
|
|
||||||
# DNS Configuration
|
# DNS Configuration
|
||||||
# Customize DNS resolution for redirecting traffic to proxy servers
|
# Customize DNS resolution for redirecting traffic to proxy servers
|
||||||
dnsPolicy: "" # Options: ClusterFirst, Default, None, ClusterFirstWithHostNet
|
dnsPolicy: "" # Options: ClusterFirst, Default, None, ClusterFirstWithHostNet
|
||||||
dnsConfig: {}
|
dnsConfig: {}
|
||||||
# Example configuration for custom DNS:
|
# Example configuration for custom DNS:
|
||||||
# dnsPolicy: "None" # Use only custom DNS settings
|
# dnsPolicy: "None" # Use only custom DNS settings
|
||||||
|
|
@ -294,11 +290,10 @@ mongodb:
|
||||||
auth:
|
auth:
|
||||||
enabled: false
|
enabled: false
|
||||||
databases:
|
databases:
|
||||||
- LibreChat
|
- LibreChat
|
||||||
# persistence:
|
# persistence:
|
||||||
# size: 8Gi
|
# size: 8Gi
|
||||||
|
|
||||||
|
|
||||||
meilisearch:
|
meilisearch:
|
||||||
enabled: true
|
enabled: true
|
||||||
persistence:
|
persistence:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue