diff --git a/packages/trieve/v0.11.8+1/package.yaml b/packages/trieve/v0.11.8+1/package.yaml index eefb1b9f..ad9ecffa 100644 --- a/packages/trieve/v0.11.8+1/package.yaml +++ b/packages/trieve/v0.11.8+1/package.yaml @@ -26,14 +26,176 @@ components: installedName: trieve-keycloak - name: qdrant installedName: trieve-qdrant + version: 1.11.4+3 + values: + instances: + value: '1' + memory: + value: "600Mi" - name: redis installedName: trieve-redis + version: 7.4.0+2 + values: + memory: + value: "100Mi" - name: tika installedName: trieve-tika + version: 2.9.2+2 + - name: postgresql + installedName: trieve-keycloak-db + # TODO limits memory, requests cpu memory in postgres package + values: + enableSuperuserAccess: + value: "false" + databaseName: + value: "keycloak" + storageSize: + value: "10Gi" + instances: + value: "2" + - name: postgresql + installedName: trieve-db + # TODO limits memory, requests cpu memory in postgres package + values: + enableSuperuserAccess: + value: "false" + databaseName: + value: "trieve" + storageSize: + value: "10Gi" + instances: + value: "2" dependencies: - name: clickhouse-operator - name: cloudnative-pg valueDefinitions: + domain: + type: text + metadata: + label: Domain + description: | + Base DNS name for the Trieve Ingress, without subdomains + constraints: + pattern: ^([a-z0-9]([\-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([\-a-z0-9]*[a-z0-9])?)*)?$ + required: true + targets: + - patch: + op: add + path: /data/BASE_SERVER_URL + valueTemplate: | + "http://api.{{ . }}" + resource: + apiGroup: v1 + kind: ConfigMap + name: trieve-server-config + - patch: + op: add + path: /data/VITE_API_HOST + valueTemplate: | + "http://api.{{ . }}/api" + resource: + apiGroup: v1 + kind: ConfigMap + name: trieve-ui-config + - patch: + op: add + path: /data/VITE_SEARCH_UI_URL + valueTemplate: | + "http://search.{{ . }}" + resource: + apiGroup: v1 + kind: ConfigMap + name: trieve-ui-config + - patch: + op: add + path: /data/VITE_DASHBOARD_URL + valueTemplate: | + "http://dashboard.{{ . }}" + resource: + apiGroup: v1 + kind: ConfigMap + name: trieve-ui-config + - patch: + op: add + path: /data/VITE_CHAT_UI_URL + valueTemplate: | + "http://chat.{{ . }}" + resource: + apiGroup: v1 + kind: ConfigMap + name: trieve-ui-config + - patch: + op: add + path: /data/VITE_ANALYTICS_UI_URL + valueTemplate: | + "http://analytics.{{ . }}" + resource: + apiGroup: v1 + kind: ConfigMap + name: trieve-ui-config + - patch: + op: add + path: /data/VITE_DASHBOARD_URL + valueTemplate: | + "http://dashboard.{{ . }}" + resource: + apiGroup: v1 + kind: ConfigMap + name: trieve-ui-dashboard-config + - patch: + op: add + path: /data/VITE_DASHBOARD_URL + valueTemplate: | + "http://search.{{ . }}" + resource: + apiGroup: v1 + kind: ConfigMap + name: trieve-ui-search-config + - patch: + op: add + path: /spec/rules/0/host + valueTemplate: | + "dashboard.{{ . }}" + resource: + apiGroup: networking.k8s.io/v1 + kind: Ingress + name: trieve-ui-dashboard + - patch: + op: add + path: /spec/rules/0/host + valueTemplate: | + "search.{{ . }}" + resource: + apiGroup: networking.k8s.io/v1 + kind: Ingress + name: trieve-ui-search + - patch: + op: add + path: /spec/rules/0/host + valueTemplate: | + "analytics.{{ . }}" + resource: + apiGroup: networking.k8s.io/v1 + kind: Ingress + name: trieve-ui-analytics + - patch: + op: add + path: /spec/rules/0/host + valueTemplate: | + "chat.{{ . }}" + resource: + apiGroup: networking.k8s.io/v1 + kind: Ingress + name: trieve-ui-chat + - patch: + op: add + path: /spec/rules/0/host + valueTemplate: | + "api.{{ . }}" + resource: + apiGroup: networking.k8s.io/v1 + kind: Ingress + name: trieve-server cpuMode: type: boolean defaultValue: "true" @@ -259,7 +421,23 @@ references: url: https://docs.trieve.ai/ - label: GitHub url: https://github.com/devflowinc/trieve - +transitiveResources: + - apiGroup: v1 + kind: Secret + name: trieve-keycloak-db-cluster-app + - apiGroup: v1 + kind: Secret + name: trieve-keycloak-db-cluster-rw + - apiGroup: v1 + kind: Secret + name: trieve-db-cluster-app + - apiGroup: v1 + kind: Secret + name: trieve-qdrant-qdrant-apikey + # TODO doesn't work yet because it produces a namespace conflict during kustomization?? (removing default namespace did not work) +# - apiGroup: v1 +# kind: ConfigMap +# name: trieve-clickhouse-scripts transformations: - source: path: '{ $.metadata.name }' @@ -271,7 +449,7 @@ transformations: apiGroup: k8s.keycloak.org/v2alpha1 name: trieve-keycloak kind: Keycloak - valueTemplate: '"{{ . }}-trieve-keycloak-db-rw"' + valueTemplate: '"{{ . }}-trieve-keycloak-db-cluster-rw"' - patch: op: replace path: /spec/db/passwordSecret/name @@ -279,7 +457,7 @@ transformations: apiGroup: k8s.keycloak.org/v2alpha1 name: trieve-keycloak kind: Keycloak - valueTemplate: '"{{ . }}-trieve-keycloak-db-app"' + valueTemplate: '"{{ . }}-trieve-keycloak-db-cluster-app"' - patch: op: replace path: /spec/db/usernameSecret/name @@ -287,7 +465,7 @@ transformations: apiGroup: k8s.keycloak.org/v2alpha1 name: trieve-keycloak kind: Keycloak - valueTemplate: '"{{ . }}-trieve-keycloak-db-app"' + valueTemplate: '"{{ . }}-trieve-keycloak-db-cluster-app"' - patch: op: replace path: /spec/hostname/hostname diff --git a/packages/trieve/v0.11.8+1/trieve.yaml b/packages/trieve/v0.11.8+1/trieve.yaml index 63682a0e..22715914 100644 --- a/packages/trieve/v0.11.8+1/trieve.yaml +++ b/packages/trieve/v0.11.8+1/trieve.yaml @@ -132,7 +132,7 @@ data: QDRANT_URL: http://trieve-qdrant-qdrant:6334 QUANTIZE_VECTORS: "false" REDIS_CONNECTIONS: "2" - REDIS_URL: redis://redis:6379 + REDIS_URL: redis://trieve-redis-redis:6379 REPLICATION_FACTOR: "2" RERANKER_SERVER_ORIGIN: http://trieve-embedding-reranker RUST_LOG: INFO @@ -151,7 +151,7 @@ data: SPARSE_SERVER_QUERY_ORIGIN: http://trieve-embedding-splade-query STRIPE_SECRET: "" STRIPE_WEBHOOK_SECRET: "" - TIKA_URL: http://tika:9998 + TIKA_URL: http://trieve-tika-tika:9998 UNLIMITED: "true" USE_ANALYTICS: "true" VECTOR_SIZES: 384,512,768,1024,1536,3072 @@ -639,12 +639,12 @@ spec: valueFrom: secretKeyRef: key: uri - name: trieve-trieve-postgresql-server-app # patched + name: trieve-db-cluster-app - name: QDRANT_API_KEY valueFrom: secretKeyRef: key: api-key - name: trieve-trieve-qdrant-qdrant-apikey # patched + name: trieve-qdrant-qdrant-apikey envFrom: - configMapRef: name: trieve-server-config @@ -654,7 +654,8 @@ spec: - containerPort: 8090 resources: requests: - cpu: "1" + cpu: 50m + memory: 100Mi --- apiVersion: apps/v1 kind: Deployment @@ -689,7 +690,12 @@ spec: name: ui ports: - containerPort: 80 - resources: {} + resources: + limits: + memory: 500Mi + requests: + cpu: 10m + memory: 50Mi --- apiVersion: apps/v1 kind: Deployment @@ -724,7 +730,12 @@ spec: name: ui ports: - containerPort: 80 - resources: {} + resources: + limits: + memory: 500Mi + requests: + cpu: 10m + memory: 50Mi --- apiVersion: apps/v1 kind: Deployment @@ -759,7 +770,12 @@ spec: name: ui ports: - containerPort: 80 - resources: {} + resources: + limits: + memory: 500Mi + requests: + cpu: 10m + memory: 50Mi --- apiVersion: apps/v1 kind: Deployment @@ -794,7 +810,12 @@ spec: name: ui ports: - containerPort: 80 - resources: {} + resources: + limits: + memory: 500Mi + requests: + cpu: 10m + memory: 50Mi --- apiVersion: apps/v1 kind: Deployment @@ -827,12 +848,12 @@ spec: valueFrom: secretKeyRef: key: uri - name: trieve-trieve-postgresql-server-app # patched + name: trieve-db-cluster-app - name: QDRANT_API_KEY valueFrom: secretKeyRef: key: api-key - name: trieve-trieve-qdrant-qdrant-apikey # patched + name: trieve-qdrant-qdrant-apikey envFrom: - configMapRef: name: trieve-server-config @@ -844,6 +865,8 @@ spec: limits: cpu: "1" memory: 200Mi + requests: + cpu: 50m --- apiVersion: apps/v1 kind: Deployment @@ -877,12 +900,12 @@ spec: valueFrom: secretKeyRef: key: uri - name: trieve-trieve-postgresql-server-app # patched + name: trieve-db-cluster-app - name: QDRANT_API_KEY valueFrom: secretKeyRef: key: api-key - name: trieve-trieve-qdrant-qdrant-apikey # patched + name: trieve-qdrant-qdrant-apikey envFrom: - configMapRef: name: trieve-server-config @@ -894,6 +917,8 @@ spec: limits: cpu: "1" memory: 200Mi + requests: + cpu: 50m --- apiVersion: apps/v1 kind: Deployment @@ -926,12 +951,12 @@ spec: valueFrom: secretKeyRef: key: uri - name: trieve-trieve-postgresql-server-app # patched + name: trieve-db-cluster-app - name: QDRANT_API_KEY valueFrom: secretKeyRef: key: api-key - name: trieve-trieve-qdrant-qdrant-apikey # patched + name: trieve-qdrant-qdrant-apikey envFrom: - configMapRef: name: trieve-server-config @@ -943,6 +968,8 @@ spec: limits: cpu: "1" memory: 200Mi + requests: + cpu: 50m --- apiVersion: apps/v1 kind: Deployment @@ -975,12 +1002,12 @@ spec: valueFrom: secretKeyRef: key: uri - name: trieve-trieve-postgresql-server-app # patched + name: trieve-db-cluster-app - name: QDRANT_API_KEY valueFrom: secretKeyRef: key: api-key - name: trieve-trieve-qdrant-qdrant-apikey # patched + name: trieve-qdrant-qdrant-apikey envFrom: - configMapRef: name: trieve-server-config @@ -992,6 +1019,8 @@ spec: limits: cpu: "1" memory: 200Mi + requests: + cpu: 50m --- apiVersion: apps/v1 kind: Deployment @@ -1024,12 +1053,12 @@ spec: valueFrom: secretKeyRef: key: uri - name: trieve-trieve-postgresql-server-app # patched + name: trieve-db-cluster-app - name: QDRANT_API_KEY valueFrom: secretKeyRef: key: api-key - name: trieve-trieve-qdrant-qdrant-apikey # patched + name: trieve-qdrant-qdrant-apikey envFrom: - configMapRef: name: trieve-server-config @@ -1041,6 +1070,8 @@ spec: limits: cpu: "1" memory: 200Mi + requests: + cpu: 50m --- apiVersion: apps/v1 kind: Deployment @@ -1073,12 +1104,12 @@ spec: valueFrom: secretKeyRef: key: uri - name: trieve-trieve-postgresql-server-app # patched + name: trieve-db-cluster-app - name: QDRANT_API_KEY valueFrom: secretKeyRef: key: api-key - name: trieve-trieve-qdrant-qdrant-apikey # patched + name: trieve-qdrant-qdrant-apikey envFrom: - configMapRef: name: trieve-server-config @@ -1090,6 +1121,8 @@ spec: limits: cpu: "1" memory: 200Mi + requests: + cpu: 50m --- apiVersion: apps/v1 kind: Deployment @@ -1122,12 +1155,12 @@ spec: valueFrom: secretKeyRef: key: uri - name: trieve-trieve-postgresql-server-app # patched + name: trieve-db-cluster-app - name: QDRANT_API_KEY valueFrom: secretKeyRef: key: api-key - name: trieve-trieve-qdrant-qdrant-apikey # patched + name: trieve-qdrant-qdrant-apikey envFrom: - configMapRef: name: trieve-server-config @@ -1139,6 +1172,8 @@ spec: limits: cpu: "1" memory: 200Mi + requests: + cpu: 50m --- apiVersion: apps/v1 kind: Deployment @@ -1172,12 +1207,12 @@ spec: valueFrom: secretKeyRef: key: uri - name: trieve-trieve-postgresql-server-app # patched + name: trieve-db-cluster-app - name: QDRANT_API_KEY valueFrom: secretKeyRef: key: api-key - name: trieve-trieve-qdrant-qdrant-apikey # patched + name: trieve-qdrant-qdrant-apikey envFrom: - configMapRef: name: trieve-server-config @@ -1189,6 +1224,8 @@ spec: limits: cpu: "1" memory: 200Mi + requests: + cpu: 50m --- apiVersion: apps/v1 kind: Deployment @@ -1221,12 +1258,12 @@ spec: valueFrom: secretKeyRef: key: uri - name: trieve-trieve-postgresql-server-app # patched + name: trieve-db-cluster-app - name: QDRANT_API_KEY valueFrom: secretKeyRef: key: api-key - name: trieve-trieve-qdrant-qdrant-apikey # patched + name: trieve-qdrant-qdrant-apikey envFrom: - configMapRef: name: trieve-server-config @@ -1238,6 +1275,8 @@ spec: limits: cpu: "1" memory: 200Mi + requests: + cpu: 50m --- apiVersion: batch/v1 kind: CronJob @@ -1351,12 +1390,12 @@ spec: valueFrom: secretKeyRef: key: uri - name: trieve-trieve-postgresql-server-app # patched + name: trieve-db-cluster-app - name: QDRANT_API_KEY valueFrom: secretKeyRef: key: api-key - name: trieve-trieve-qdrant-qdrant-apikey # patched + name: trieve-qdrant-qdrant-apikey envFrom: - configMapRef: name: trieve-server-config @@ -1401,49 +1440,55 @@ spec: - name: CLICKHOUSE_ALWAYS_RUN_INITDB_SCRIPTS value: "true" - name: EMBEDDING_SERVER_URL - value: http://trieve-trieve-embedding-bgem3 # patched + value: http://trieve-embedding-bgem3 - name: CLICKHOUSE_ADMIN_PASSWORD value: password image: clickhouse/clickhouse-server:24.8 name: clickhouse + resources: + limits: + memory: 2Gi + requests: + cpu: 100m + memory: 500Mi volumeMounts: - mountPath: /opt/user_scripts - name: trieve-trieve-clickhouse-userscripts # patched + name: trieve-clickhouse-userscripts - mountPath: /var/lib/clickhouse - name: trieve-trieve-clickhouse-data # patched + name: trieve-clickhouse-data - mountPath: /var/log/clickhouse-server - name: trieve-trieve-clickhouse-logs # patched + name: trieve-clickhouse-logs - mountPath: /docker-entrypoint-initdb.d - name: trieve-trieve-clickhouse-scripts # patched + name: trieve-clickhouse-scripts readOnly: true - mountPath: /opt/user_functions/ - name: trieve-trieve-clickhouse-functions # patched + name: trieve-clickhouse-functions readOnly: true volumes: - configMap: defaultMode: 365 - name: trieve-trieve-clickhouse-scripts # patched - name: trieve-trieve-clickhouse-scripts # patched + name: trieve-clickhouse-scripts + name: trieve-clickhouse-scripts - configMap: defaultMode: 365 - name: trieve-trieve-clickhouse-functions # patched - name: trieve-trieve-clickhouse-functions # patched + name: trieve-clickhouse-functions + name: trieve-clickhouse-functions volumeClaimTemplates: - - name: trieve-trieve-clickhouse-userscripts # patched + - name: trieve-clickhouse-userscripts spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi - - name: trieve-trieve-clickhouse-data # patched + - name: trieve-clickhouse-data spec: accessModes: - ReadWriteOnce resources: requests: storage: 2Gi - - name: trieve-trieve-clickhouse-logs # patched + - name: trieve-clickhouse-logs spec: accessModes: - ReadWriteOnce @@ -1472,13 +1517,19 @@ spec: name: trieve-keycloak-db-app vendor: postgres hostname: - hostname: http://trieve-trieve-keycloak-service:8080 # patched + hostname: http://trieve-keycloak-service:8080 strict: false http: httpEnabled: true instances: 1 proxy: headers: xforwarded + resources: + limits: + memory: 2Gi + requests: + cpu: 100m + memory: 500Mi --- apiVersion: k8s.keycloak.org/v2alpha1 kind: KeycloakRealmImport @@ -3422,47 +3473,3 @@ spec: name: http path: / pathType: Prefix ---- -apiVersion: postgresql.cnpg.io/v1 -kind: Cluster -metadata: - labels: - app.kubernetes.io/component: keycloak - app.kubernetes.io/instance: trieve - app.kubernetes.io/name: trieve - app.kubernetes.io/part-of: trieve - name: trieve-keycloak-db - namespace: default -spec: - bootstrap: - initdb: - database: keycloak - owner: keycloak - enableSuperuserAccess: false - instances: 1 - monitoring: - enablePodMonitor: true - storage: - size: 2Gi ---- -apiVersion: postgresql.cnpg.io/v1 -kind: Cluster -metadata: - labels: - app.kubernetes.io/component: trieve-server - app.kubernetes.io/instance: trieve - app.kubernetes.io/name: trieve - app.kubernetes.io/part-of: trieve - name: trieve-postgresql-server - namespace: default -spec: - bootstrap: - initdb: - database: trieve - owner: trieve - enableSuperuserAccess: false - instances: 2 - monitoring: - enablePodMonitor: true - storage: - size: 2Gi