From 2fc41cd5df135fd9ce77c7da6e1263b77d589ba3 Mon Sep 17 00:00:00 2001 From: trial-danswer Date: Thu, 6 Feb 2025 10:41:09 -0800 Subject: [PATCH] Helm Chart Fixes (#3900) * initial commit for helm chart refactoring * Continue refactoring helm. I was able to use helm to deploy all of the apps to a cluster in aws. The bottleneck was setting up PVC dynamic provisioning. * use default storage class * Fix linter errors * Fix broken helm test * update * Helm chart fixes * remove reference to ebsstorage * Fix linter errors --------- Co-authored-by: jpb80 --- deployment/helm/charts/onyx/Chart.lock | 6 +- deployment/helm/charts/onyx/Chart.yaml | 2 +- .../helm/charts/onyx/templates/configmap.yaml | 4 +- deployment/helm/charts/onyx/values.yaml | 100 ++++++++---------- 4 files changed, 51 insertions(+), 61 deletions(-) diff --git a/deployment/helm/charts/onyx/Chart.lock b/deployment/helm/charts/onyx/Chart.lock index af26f510e..2b4a99bf8 100644 --- a/deployment/helm/charts/onyx/Chart.lock +++ b/deployment/helm/charts/onyx/Chart.lock @@ -4,12 +4,12 @@ dependencies: version: 14.3.1 - name: vespa repository: https://onyx-dot-app.github.io/vespa-helm-charts - version: 0.2.18 + version: 0.2.20 - name: nginx repository: oci://registry-1.docker.io/bitnamicharts version: 15.14.0 - name: redis repository: https://charts.bitnami.com/bitnami version: 20.1.0 -digest: sha256:5c9eb3d55d5f8e3beb64f26d26f686c8d62755daa10e2e6d87530bdf2fbbf957 -generated: "2024-12-10T10:47:35.812483-08:00" +digest: sha256:4615c033064a987e3f66a48f4744d2e88bd1cc932c79453c4928455695a72778 +generated: "2025-02-04T11:45:05.39228-08:00" diff --git a/deployment/helm/charts/onyx/Chart.yaml b/deployment/helm/charts/onyx/Chart.yaml index 7194de4ec..7575fb57a 100644 --- a/deployment/helm/charts/onyx/Chart.yaml +++ b/deployment/helm/charts/onyx/Chart.yaml @@ -23,7 +23,7 @@ dependencies: repository: https://charts.bitnami.com/bitnami condition: postgresql.enabled - name: vespa - version: 0.2.18 + version: 0.2.20 repository: https://onyx-dot-app.github.io/vespa-helm-charts condition: vespa.enabled - name: nginx diff --git a/deployment/helm/charts/onyx/templates/configmap.yaml b/deployment/helm/charts/onyx/templates/configmap.yaml index 3a79eca7d..3ee822abc 100755 --- a/deployment/helm/charts/onyx/templates/configmap.yaml +++ b/deployment/helm/charts/onyx/templates/configmap.yaml @@ -7,10 +7,10 @@ metadata: data: INTERNAL_URL: "http://{{ include "onyx-stack.fullname" . }}-api-service:{{ .Values.api.service.port | default 8080 }}" POSTGRES_HOST: {{ .Release.Name }}-postgresql - VESPA_HOST: da-vespa-0.vespa-service + VESPA_HOST: {{ .Values.vespa.name }}.{{ .Values.vespa.service.name }}.{{ .Release.Namespace }}.svc.cluster.local REDIS_HOST: {{ .Release.Name }}-redis-master MODEL_SERVER_HOST: "{{ include "onyx-stack.fullname" . }}-inference-model-service" INDEXING_MODEL_SERVER_HOST: "{{ include "onyx-stack.fullname" . }}-indexing-model-service" {{- range $key, $value := .Values.configMap }} {{ $key }}: "{{ $value }}" -{{- end }} \ No newline at end of file +{{- end }} diff --git a/deployment/helm/charts/onyx/values.yaml b/deployment/helm/charts/onyx/values.yaml index 9c819b1e7..ba2bed085 100644 --- a/deployment/helm/charts/onyx/values.yaml +++ b/deployment/helm/charts/onyx/values.yaml @@ -5,6 +5,7 @@ postgresql: primary: persistence: + storageClass: "" size: 5Gi enabled: true auth: @@ -12,13 +13,52 @@ postgresql: secretKeys: # overwriting as postgres typically expects 'postgres-password' adminPasswordKey: postgres_password -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" + +vespa: + name: da-vespa-0 + service: + name: vespa-service + volumeClaimTemplates: + - metadata: + name: vespa-storage + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + storageClassName: "" + enabled: true + replicaCount: 1 + image: + repository: vespa + pullPolicy: IfNotPresent + tag: "8.277.17" + podAnnotations: {} + podLabels: + app: vespa + app.kubernetes.io/instance: onyx + app.kubernetes.io/name: vespa + securityContext: + privileged: true + runAsUser: 0 + resources: + # The Vespa Helm chart specifies default resources, which are quite modest. We override + # them here to increase chances of the chart running successfully. + requests: + cpu: 1500m + memory: 4000Mi + limits: + cpu: 1500m + memory: 4000Mi persistent: storageClassName: "" +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + inferenceCapability: service: portName: modelserver @@ -272,15 +312,9 @@ background: podSecurityContext: {} # fsGroup: 2000 - securityContext: - {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 + privileged: true + runAsUser: 0 enableMiniChunk: "true" resources: {} # We usually recommend not to specify default resources and to leave this as a conscious @@ -316,50 +350,6 @@ background: nodeSelector: {} tolerations: [] - -vespa: - volumeClaimTemplates: - - metadata: - name: vespa-storage - spec: - accessModes: - - ReadWriteOnce - storageClassName: "" - resources: - requests: - storage: 1Gi - enabled: true - replicaCount: 1 - image: - repository: vespa - pullPolicy: IfNotPresent - tag: "8.277.17" - podAnnotations: {} - podLabels: - app: vespa - app.kubernetes.io/instance: onyx - app.kubernetes.io/name: vespa - - podSecurityContext: - {} - # fsGroup: 2000 - - securityContext: - privileged: true - runAsUser: 0 - - resources: - # The Vespa Helm chart specifies default resources, which are quite modest. We override - # them here to increase chances of the chart running successfully. - requests: - cpu: 1500m - memory: 4000Mi - limits: - cpu: 1500m - memory: 4000Mi - - nodeSelector: {} - tolerations: [] affinity: {} redis: