4 Commits

Author SHA1 Message Date
14cd773501 Update renovate/renovate Docker tag to v39.227.3 2025-04-01 02:00:34 +00:00
37b78f079e Add librechat 2025-04-01 02:55:59 +02:00
0d17825eab Add mongodb database for librechat 2025-04-01 00:35:50 +02:00
ffeecf65f6 Mongodb operator 2025-03-31 23:38:58 +02:00
5 changed files with 177 additions and 1 deletions

View File

@@ -4,3 +4,4 @@ resources:
- gitea.yaml
- renovate.yaml
- ollama.yaml
- librechat.yaml

141
apps/librechat.yaml Normal file
View File

@@ -0,0 +1,141 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: librechat
---
# Manually create database serviceaccount
# https://github.com/mongodb/helm-charts/blob/01e50752b84de90607f12b1bd8d32c2d3493f1d2/charts/community-operator/templates/database_roles.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: mongodb-database
namespace: librechat
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: mongodb-database
namespace: librechat
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- apiGroups:
- ""
resources:
- pods
verbs:
- patch
- delete
- get
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: mongodb-database
namespace: librechat
subjects:
- kind: ServiceAccount
name: mongodb-database
roleRef:
kind: Role
name: mongodb-database
apiGroup: rbac.authorization.k8s.io
---
apiVersion: mongodbcommunity.mongodb.com/v1
kind: MongoDBCommunity
metadata:
name: librechat
namespace: librechat
spec:
members: 1
type: ReplicaSet
version: "6.0.5"
security:
authentication:
modes: ["SCRAM"]
users:
- name: librechat
db: LibreChat
passwordSecretRef: # a reference to the secret that will be used to generate the user's password
name: librechat-mongodb-secret
roles:
- name: clusterAdmin
db: admin
- name: userAdminAnyDatabase
db: admin
- name: readWriteAnyDatabase
db: admin
scramCredentialsSecretName: my-scram
additionalMongodConfig:
storage.wiredTiger.engineConfig.journalCompressor: zlib
statefulSet:
spec:
volumeClaimTemplates:
- metadata:
name: data-volume
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: openebs-single-replica
resources:
requests:
storage: 10Gi
- metadata:
name: logs-volume
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: openebs-single-replica
resources:
requests:
storage: 1Gi
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: librechat
namespace: librechat
spec:
interval: 1h
url: https://github.com/danny-avila/LibreChat.git
ref:
tag: v0.7.7
ignore: |
# exclude all
/*
# include charts
!/charts/
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: librechat
namespace: librechat
spec:
interval: 10m
chart:
spec:
chart: ./charts/librechat
sourceRef:
kind: GitRepository
name: librechat
namespace: librechat
interval: 10m
values:
replicaCount: 1
# image:
# tag: v0.7.7 # Not pinned in chart for some reason
config:
envSecrets:
secretRef: librechat
secretKeyRef:
- name: MONGO_URI
secretName: librechat-librechat-librechat
secretKey: connectionString.standardSrv
env:
TRUST_PROXY: 1
DOMAIN_CLIENT: https://librechat.lumpiasty.xyz
ALLOW_REGISTRATION: false

View File

@@ -20,7 +20,7 @@ spec:
- name: renovate
# Update this to the latest available and then enable Renovate on
# the manifest
image: renovate/renovate:39.227.2-full
image: renovate/renovate:39.227.3-full
envFrom:
- secretRef:
name: renovate-env

View File

@@ -0,0 +1,33 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: mongodb
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: mongodb
namespace: mongodb
spec:
interval: 24h
url: https://mongodb.github.io/helm-charts
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: mongodb-operator
namespace: mongodb
spec:
interval: 30m
chart:
spec:
chart: community-operator
version: 0.12.0
sourceRef:
kind: HelmRepository
name: mongodb
namespace: mongodb
values:
operator:
watchNamespace: "*"

View File

@@ -10,6 +10,7 @@ resources:
- controllers/openebs.yaml
- controllers/k8up.yaml
- controllers/openbao.yaml
- controllers/mongodb-operator.yaml
- diskpools/anapistula-delrosalae-hdd.yaml
- configs/bgp-cluster-config.yaml
- configs/loadbalancer-ippool.yaml