diff --git a/charts/studio/Chart.yaml b/charts/studio/Chart.yaml index 3ef55a4d..e0a3a42a 100644 --- a/charts/studio/Chart.yaml +++ b/charts/studio/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: studio description: A Helm chart for Kubernetes type: application -version: 0.15.7 +version: 0.16.0 appVersion: "v2.125.0" maintainers: - name: iterative diff --git a/charts/studio/README.md b/charts/studio/README.md index 9c431339..898a0d34 100644 --- a/charts/studio/README.md +++ b/charts/studio/README.md @@ -1,6 +1,6 @@ # studio -![Version: 0.15.7](https://img.shields.io/badge/Version-0.15.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.125.0](https://img.shields.io/badge/AppVersion-v2.125.0-informational?style=flat-square) +![Version: 0.16.0](https://img.shields.io/badge/Version-0.16.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.125.0](https://img.shields.io/badge/AppVersion-v2.125.0-informational?style=flat-square) A Helm chart for Kubernetes @@ -41,7 +41,7 @@ A Helm chart for Kubernetes | global.celery.resultBackend | string | `""` | Celery result URL | | global.customCaCert | DEPRECATED | `""` | Studio: Custom CA certificate in PEM format Deprecated in favor of `customCaCerts` customCaCert: |- -----BEGIN CERTIFICATE----- .... -----END CERTIFICATE----- | | global.customCaCerts | list | `[]` | Studio: Custom CA certificate in PEM format customCaCerts: - |- -----BEGIN CERTIFICATE----- .... -----END CERTIFICATE----- | -| global.dvcx | object | `{}` | Studio: Settings related to DVCX | +| global.datachain | object | `{}` | Studio: Settings related to DataChain | | global.envFromSecret | string | `""` | Studio: The name of an existing Secret that contains sensitive environment variables passed to all Studio pods. | | global.envVars | object | `{}` | Studio: Additional environment variables for all pods | | global.host | string | `"studio.example.com"` | Studio: Hostname for accessing Studio (no http(s) scheme) | @@ -93,7 +93,7 @@ A Helm chart for Kubernetes | pgBouncer.autoscaling.maxReplicas | int | `5` | PgBouncer autoscaling max replicas | | pgBouncer.autoscaling.minReplicas | int | `1` | PgBouncer autoscaling min replicas | | pgBouncer.autoscaling.targetCPUUtilizationPercentage | int | `80` | PgBouncer autoscaling target CPU utilization percentage | -| pgBouncer.envFromSecret | string | `""` | The name of an existing Secret that contains sensitive environment variables passed to DVCx worker pods. | +| pgBouncer.envFromSecret | string | `""` | The name of an existing Secret that contains sensitive environment variables. | | pgBouncer.envVars | object | `{}` | Additional environment variables for PgBouncer pods | | pgBouncer.image | object | `{"pullPolicy":"IfNotPresent","repository":"docker.io/bitnami/pgbouncer","tag":"1.22.1"}` | PgBouncer image settings | | pgBouncer.image.pullPolicy | string | `"IfNotPresent"` | PgBouncer image pull policy | @@ -139,43 +139,43 @@ A Helm chart for Kubernetes | studioBlobvault.image | object | `{"repository":"nginx","tag":"1.27.0-alpine"}` | Image to use for the blobvault service | | studioBlobvault.image.repository | string | `"nginx"` | Image repository | | studioBlobvault.image.tag | string | `"1.27.0-alpine"` | Image tag | -| studioDvcxWorker | object | `{"affinity":{},"autoscaling":{"annotations":{},"behavior":{},"enabled":false,"maxReplicas":5,"minReplicas":1,"targetCPUUtilizationPercentage":80,"template":[]},"envFromSecret":"","envVars":{},"ephemeralStorage":{"persistentVolumeClaim":{"claimName":"dvcx-worker","storageClass":""},"size":"20Gi","type":"ephemeral"},"image":{"pullPolicy":"IfNotPresent","repository":"docker.iterative.ai/studio-dvcx-worker"},"localStorage":{"persistentVolumeClaim":{"claimName":"dvcx-worker-local","storageClass":""},"size":"1Gi","type":"ephemeral"},"logLevel":"info","nodeSelector":{},"podAnnotations":{},"podSecurityContext":{},"replicaCount":1,"resources":{"limits":{"ephemeral-storage":"20Gi","memory":"16Gi"},"requests":{"cpu":"1000m","ephemeral-storage":"10Gi","memory":"3Gi"}},"securityContext":{},"serviceAccount":{"annotations":{},"create":false,"name":""},"strategy":{"rollingUpdate":{"maxSurge":"25%","maxUnavailable":0}},"tolerations":[]}` | Studio DVCx Worker settings group | -| studioDvcxWorker.affinity | object | `{}` | DVCx worker pod affinity configuration | -| studioDvcxWorker.autoscaling | object | `{"annotations":{},"behavior":{},"enabled":false,"maxReplicas":5,"minReplicas":1,"targetCPUUtilizationPercentage":80,"template":[]}` | DVCx worker autoscaling configuration | -| studioDvcxWorker.autoscaling.annotations | object | `{}` | Worker autoscaling annotation | -| studioDvcxWorker.autoscaling.behavior | object | `{}` | DVCx worker autoscaling behavior | -| studioDvcxWorker.autoscaling.enabled | bool | `false` | DVCx worker autoscaling enabled flag | -| studioDvcxWorker.autoscaling.maxReplicas | int | `5` | DVCx worker autoscaling max replicas | -| studioDvcxWorker.autoscaling.minReplicas | int | `1` | DVCx worker autoscaling min replicas | -| studioDvcxWorker.autoscaling.targetCPUUtilizationPercentage | int | `80` | DVCx worker autoscaling target CPU utilization percentage | -| studioDvcxWorker.autoscaling.template | list | `[]` | DVCx worker Custom or additional autoscaling metrics Custom or additional autoscaling metrics ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-custom-metrics | -| studioDvcxWorker.envFromSecret | string | `""` | The name of an existing Secret that contains sensitive environment variables passed to DVCx worker pods. | -| studioDvcxWorker.envVars | object | `{}` | Additional environment variables for DVCx worker pods | -| studioDvcxWorker.ephemeralStorage | object | `{"persistentVolumeClaim":{"claimName":"dvcx-worker","storageClass":""},"size":"20Gi","type":"ephemeral"}` | Ephemeral storage configuration | -| studioDvcxWorker.ephemeralStorage.persistentVolumeClaim | object | `{"claimName":"dvcx-worker","storageClass":""}` | Persistent Volume Claim configuration for ephemeral storage (if type is set `pvc`) | -| studioDvcxWorker.ephemeralStorage.persistentVolumeClaim.claimName | string | `"dvcx-worker"` | Persistent Volume Claim name, to mount externally managed PVC (`ephemeralStorage.type` has to be set to `pvc`) | -| studioDvcxWorker.ephemeralStorage.persistentVolumeClaim.storageClass | string | `""` | Persistent Volume Claim `storageClass` name, by default it will use the default `storageClass`(not used when `pvc` is set as type) | -| studioDvcxWorker.ephemeralStorage.size | string | `"20Gi"` | Ephemeral Storage size | -| studioDvcxWorker.ephemeralStorage.type | string | `"ephemeral"` | Ephemeral Storage type. Possible values: `emptyDir`, `ephemeral`, `pvc`, `pvcRWX` | -| studioDvcxWorker.image | object | `{"pullPolicy":"IfNotPresent","repository":"docker.iterative.ai/studio-dvcx-worker"}` | DVCx worker image settings | -| studioDvcxWorker.image.pullPolicy | string | `"IfNotPresent"` | DVCx worker image pull policy | -| studioDvcxWorker.image.repository | string | `"docker.iterative.ai/studio-dvcx-worker"` | DVCx worker image repository | -| studioDvcxWorker.localStorage | object | `{"persistentVolumeClaim":{"claimName":"dvcx-worker-local","storageClass":""},"size":"1Gi","type":"ephemeral"}` | Local storage configuration | -| studioDvcxWorker.localStorage.persistentVolumeClaim | object | `{"claimName":"dvcx-worker-local","storageClass":""}` | Persistent Volume Claim configuration for local storage | -| studioDvcxWorker.localStorage.persistentVolumeClaim.claimName | string | `"dvcx-worker-local"` | Persistent Volume Claim name, to mount externally managed PVC (`localStorage.type` has to be set to `pvc`) | -| studioDvcxWorker.localStorage.persistentVolumeClaim.storageClass | string | `""` | Persistent Volume Claim `storageClass` name, by default it will use the default `storageClass`(not used when `pvc` is set as type) | -| studioDvcxWorker.localStorage.size | string | `"1Gi"` | Local Storage size | -| studioDvcxWorker.localStorage.type | string | `"ephemeral"` | Local Storage type. Possible values: `emptyDir`, `ephemeral`, `pvc` | -| studioDvcxWorker.logLevel | string | `"info"` | DVCx worker log level | -| studioDvcxWorker.nodeSelector | object | `{}` | DVCx worker pod node selector configuration | -| studioDvcxWorker.podAnnotations | object | `{}` | Additional DVCx worker pod annotations | -| studioDvcxWorker.podSecurityContext | object | `{}` | DVCx worker pod security context configuration | -| studioDvcxWorker.resources | object | `{"limits":{"ephemeral-storage":"20Gi","memory":"16Gi"},"requests":{"cpu":"1000m","ephemeral-storage":"10Gi","memory":"3Gi"}}` | DVCx worker resources configuration | -| studioDvcxWorker.resources.limits | object | `{"ephemeral-storage":"20Gi","memory":"16Gi"}` | DVCx worker limits configuration | -| studioDvcxWorker.resources.requests | object | `{"cpu":"1000m","ephemeral-storage":"10Gi","memory":"3Gi"}` | DVCx worker requests configuration | -| studioDvcxWorker.securityContext | object | `{}` | DVCx worker pod security context configuration | -| studioDvcxWorker.strategy | object | `{"rollingUpdate":{"maxSurge":"25%","maxUnavailable":0}}` | DVCx worker deployment strategy | -| studioDvcxWorker.tolerations | list | `[]` | DVCx worker pod tolerations configuration | +| studioDatachainWorker | object | `{"affinity":{},"autoscaling":{"annotations":{},"behavior":{},"enabled":false,"maxReplicas":5,"minReplicas":1,"targetCPUUtilizationPercentage":80,"template":[]},"envFromSecret":"","envVars":{},"ephemeralStorage":{"persistentVolumeClaim":{"claimName":"datachain-worker","storageClass":""},"size":"20Gi","type":"ephemeral"},"image":{"pullPolicy":"IfNotPresent","repository":"docker.iterative.ai/studio-datachain-worker"},"localStorage":{"persistentVolumeClaim":{"claimName":"datachain-worker-local","storageClass":""},"size":"1Gi","type":"ephemeral"},"logLevel":"info","nodeSelector":{},"podAnnotations":{},"podSecurityContext":{},"replicaCount":1,"resources":{"limits":{"ephemeral-storage":"20Gi","memory":"16Gi"},"requests":{"cpu":"1000m","ephemeral-storage":"10Gi","memory":"3Gi"}},"securityContext":{},"serviceAccount":{"annotations":{},"create":false,"name":""},"strategy":{"rollingUpdate":{"maxSurge":"25%","maxUnavailable":0}},"tolerations":[]}` | Studio DataChain Worker settings group | +| studioDatachainWorker.affinity | object | `{}` | DataChain worker pod affinity configuration | +| studioDatachainWorker.autoscaling | object | `{"annotations":{},"behavior":{},"enabled":false,"maxReplicas":5,"minReplicas":1,"targetCPUUtilizationPercentage":80,"template":[]}` | DataChain worker autoscaling configuration | +| studioDatachainWorker.autoscaling.annotations | object | `{}` | Worker autoscaling annotation | +| studioDatachainWorker.autoscaling.behavior | object | `{}` | DataChain worker autoscaling behavior | +| studioDatachainWorker.autoscaling.enabled | bool | `false` | DataChain worker autoscaling enabled flag | +| studioDatachainWorker.autoscaling.maxReplicas | int | `5` | DataChain worker autoscaling max replicas | +| studioDatachainWorker.autoscaling.minReplicas | int | `1` | DataChain worker autoscaling min replicas | +| studioDatachainWorker.autoscaling.targetCPUUtilizationPercentage | int | `80` | DataChain worker autoscaling target CPU utilization percentage | +| studioDatachainWorker.autoscaling.template | list | `[]` | DataChain worker Custom or additional autoscaling metrics Custom or additional autoscaling metrics ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-custom-metrics | +| studioDatachainWorker.envFromSecret | string | `""` | The name of an existing Secret that contains sensitive environment variables passed to DataChain worker pods. | +| studioDatachainWorker.envVars | object | `{}` | Additional environment variables for DataChain worker pods | +| studioDatachainWorker.ephemeralStorage | object | `{"persistentVolumeClaim":{"claimName":"datachain-worker","storageClass":""},"size":"20Gi","type":"ephemeral"}` | Ephemeral storage configuration | +| studioDatachainWorker.ephemeralStorage.persistentVolumeClaim | object | `{"claimName":"datachain-worker","storageClass":""}` | Persistent Volume Claim configuration for ephemeral storage (if type is set `pvc`) | +| studioDatachainWorker.ephemeralStorage.persistentVolumeClaim.claimName | string | `"datachain-worker"` | Persistent Volume Claim name, to mount externally managed PVC (`ephemeralStorage.type` has to be set to `pvc`) | +| studioDatachainWorker.ephemeralStorage.persistentVolumeClaim.storageClass | string | `""` | Persistent Volume Claim `storageClass` name, by default it will use the default `storageClass`(not used when `pvc` is set as type) | +| studioDatachainWorker.ephemeralStorage.size | string | `"20Gi"` | Ephemeral Storage size | +| studioDatachainWorker.ephemeralStorage.type | string | `"ephemeral"` | Ephemeral Storage type. Possible values: `emptyDir`, `ephemeral`, `pvc`, `pvcRWX` | +| studioDatachainWorker.image | object | `{"pullPolicy":"IfNotPresent","repository":"docker.iterative.ai/studio-datachain-worker"}` | DataChain worker image settings | +| studioDatachainWorker.image.pullPolicy | string | `"IfNotPresent"` | DataChain worker image pull policy | +| studioDatachainWorker.image.repository | string | `"docker.iterative.ai/studio-datachain-worker"` | DataChain worker image repository | +| studioDatachainWorker.localStorage | object | `{"persistentVolumeClaim":{"claimName":"datachain-worker-local","storageClass":""},"size":"1Gi","type":"ephemeral"}` | Local storage configuration | +| studioDatachainWorker.localStorage.persistentVolumeClaim | object | `{"claimName":"datachain-worker-local","storageClass":""}` | Persistent Volume Claim configuration for local storage | +| studioDatachainWorker.localStorage.persistentVolumeClaim.claimName | string | `"datachain-worker-local"` | Persistent Volume Claim name, to mount externally managed PVC (`localStorage.type` has to be set to `pvc`) | +| studioDatachainWorker.localStorage.persistentVolumeClaim.storageClass | string | `""` | Persistent Volume Claim `storageClass` name, by default it will use the default `storageClass`(not used when `pvc` is set as type) | +| studioDatachainWorker.localStorage.size | string | `"1Gi"` | Local Storage size | +| studioDatachainWorker.localStorage.type | string | `"ephemeral"` | Local Storage type. Possible values: `emptyDir`, `ephemeral`, `pvc` | +| studioDatachainWorker.logLevel | string | `"info"` | DataChain worker log level | +| studioDatachainWorker.nodeSelector | object | `{}` | DataChain worker pod node selector configuration | +| studioDatachainWorker.podAnnotations | object | `{}` | Additional DataChain worker pod annotations | +| studioDatachainWorker.podSecurityContext | object | `{}` | DataChain worker pod security context configuration | +| studioDatachainWorker.resources | object | `{"limits":{"ephemeral-storage":"20Gi","memory":"16Gi"},"requests":{"cpu":"1000m","ephemeral-storage":"10Gi","memory":"3Gi"}}` | DataChain worker resources configuration | +| studioDatachainWorker.resources.limits | object | `{"ephemeral-storage":"20Gi","memory":"16Gi"}` | DataChain worker limits configuration | +| studioDatachainWorker.resources.requests | object | `{"cpu":"1000m","ephemeral-storage":"10Gi","memory":"3Gi"}` | DataChain worker requests configuration | +| studioDatachainWorker.securityContext | object | `{}` | DataChain worker pod security context configuration | +| studioDatachainWorker.strategy | object | `{"rollingUpdate":{"maxSurge":"25%","maxUnavailable":0}}` | DataChain worker deployment strategy | +| studioDatachainWorker.tolerations | list | `[]` | DataChain worker pod tolerations configuration | | studioUi | object | `{"affinity":{},"autoscaling":{"enabled":false,"maxReplicas":5,"minReplicas":1,"targetCPUUtilizationPercentage":80},"envFromSecret":"","envVars":{},"image":{"pullPolicy":"IfNotPresent","repository":"docker.iterative.ai/studio-frontend"},"nodeSelector":{},"podAnnotations":{},"podSecurityContext":{},"replicaCount":1,"resources":{"limits":{"memory":"2Gi"},"requests":{"cpu":"500m","memory":"1Gi"}},"securityContext":{},"service":{"port":3000,"type":"ClusterIP"},"strategy":{"rollingUpdate":{"maxSurge":1,"maxUnavailable":0}},"tolerations":[]}` | Studio UI settings group | | studioUi.envFromSecret | string | `""` | The name of an existing Secret that contains sensitive environment variables passed to UI pods. | | studioUi.envVars | object | `{}` | Additional environment variables for ui pods | diff --git a/charts/studio/templates/_helpers.tpl b/charts/studio/templates/_helpers.tpl index b4c36c13..dddb317f 100644 --- a/charts/studio/templates/_helpers.tpl +++ b/charts/studio/templates/_helpers.tpl @@ -52,9 +52,9 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end }} -{{- define "studio-dvcx-worker.labels" -}} +{{- define "studio-datachain-worker.labels" -}} helm.sh/chart: {{ include "studio.chart" . }} -{{ include "studio-dvcx-worker.selectorLabels" . }} +{{ include "studio-datachain-worker.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -130,8 +130,8 @@ app.kubernetes.io/name: studio-beat app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} -{{- define "studio-dvcx-worker.selectorLabels" -}} -app.kubernetes.io/name: studio-dvcx-worker +{{- define "studio-datachain-worker.selectorLabels" -}} +app.kubernetes.io/name: studio-datachain-worker app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} @@ -178,11 +178,11 @@ Create the name of the service account to use {{- end }} {{- end }} -{{- define "studio-dvcx-worker.serviceAccountName" -}} -{{- if ((.Values.studioDvcxWorker).serviceAccount).create }} -{{- default (printf "%s%s" (include "studio.fullname" .) "-dvcx-worker") .Values.studioDvcxWorker.serviceAccount.name }} +{{- define "studio-datachain-worker.serviceAccountName" -}} +{{- if ((.Values.studioDatachainWorker).serviceAccount).create }} +{{- default (printf "%s%s" (include "studio.fullname" .) "-datachain-worker") .Values.studioDatachainWorker.serviceAccount.name }} {{- else }} -{{- default "default" .Values.studioDvcxWorker.serviceAccount.name }} +{{- default "default" .Values.studioDatachainWorker.serviceAccount.name }} {{- end }} {{- end }} diff --git a/charts/studio/templates/configmap-studio-datachain-worker.yaml b/charts/studio/templates/configmap-studio-datachain-worker.yaml new file mode 100644 index 00000000..3e2af766 --- /dev/null +++ b/charts/studio/templates/configmap-studio-datachain-worker.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-datachain-worker +data: + CELERY_LOG_LEVEL: "{{ .Values.studioDatachainWorker.logLevel | default "info" | lower }}" +{{- with .Values.studioDatachainWorker.envVars}} +{{- toYaml . | nindent 2 }} +{{- end }} diff --git a/charts/studio/templates/configmap-studio-dvcx-worker.yaml b/charts/studio/templates/configmap-studio-dvcx-worker.yaml deleted file mode 100644 index f3e2a768..00000000 --- a/charts/studio/templates/configmap-studio-dvcx-worker.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Release.Name }}-dvcx-worker -data: - CELERY_LOG_LEVEL: "{{ .Values.studioDvcxWorker.logLevel | default "info" | lower }}" -{{- with .Values.studioDvcxWorker.envVars}} -{{- toYaml . | nindent 2 }} -{{- end }} diff --git a/charts/studio/templates/configmap-studio.yaml b/charts/studio/templates/configmap-studio.yaml index a4add90a..e4af8af5 100644 --- a/charts/studio/templates/configmap-studio.yaml +++ b/charts/studio/templates/configmap-studio.yaml @@ -124,7 +124,7 @@ data: SOCIAL_AUTH_ALLOWED_REDIRECT_HOSTS: "studio-ui.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.studioUi.service.port }},studio-backend.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.studioBackend.service.port }}" {{- end }} - {{- $dvcx := .Values.global.dvcx | default dict }} - {{- $dvcxClickhouse := $dvcx.clickHouse | default dict }} - DVCX_ENABLED: {{ $dvcx.enabled | default false | quote | title }} - DVCX_UDF_ENABLED: {{ $dvcx.udfEnabled | default false | quote | title }} + {{- $datachain := .Values.global.datachain | default dict }} + {{- $datachainClickhouse := $datachain.clickHouse | default dict }} + DATACHAIN_ENABLED: {{ $datachain.enabled | default false | quote | title }} + DATACHAIN_UDF_ENABLED: {{ $datachain.udfEnabled | default false | quote | title }} diff --git a/charts/studio/templates/deployment-studio-backend.yaml b/charts/studio/templates/deployment-studio-backend.yaml index c234c71d..6ab5078e 100644 --- a/charts/studio/templates/deployment-studio-backend.yaml +++ b/charts/studio/templates/deployment-studio-backend.yaml @@ -51,7 +51,7 @@ spec: ./manage.py migrate {{- if not (hasPrefix "sha-" (.Values.studioBackend.image.tag | default "")) }} {{- if semverCompare "<=2.103.0" (.Values.studioBackend.image.tag | default .Chart.AppVersion) }} - ./manage.py migrate --database dvcx + ./manage.py migrate --database dvcx # FIXME: do we really still need this? {{- end }} {{- end }} {{- if and .Release.IsUpgrade (not .Values.ci) }} diff --git a/charts/studio/templates/deployment-studio-dvcx-worker.yaml b/charts/studio/templates/deployment-studio-datachain-worker.yaml similarity index 57% rename from charts/studio/templates/deployment-studio-dvcx-worker.yaml rename to charts/studio/templates/deployment-studio-datachain-worker.yaml index 1c6b1be8..7844ce06 100644 --- a/charts/studio/templates/deployment-studio-dvcx-worker.yaml +++ b/charts/studio/templates/deployment-studio-datachain-worker.yaml @@ -1,56 +1,56 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{.Release.Name}}-dvcx-worker + name: {{.Release.Name}}-datachain-worker labels: - {{- include "studio-dvcx-worker.labels" . | nindent 4 }} + {{- include "studio-datachain-worker.labels" . | nindent 4 }} spec: - {{- if not .Values.studioDvcxWorker.autoscaling.enabled }} - {{- if ((.Values.global.dvcx).udfEnabled) }} - replicas: {{ .Values.studioDvcxWorker.replicaCount }} + {{- if not .Values.studioDatachainWorker.autoscaling.enabled }} + {{- if ((.Values.global.datachain).udfEnabled) }} + replicas: {{ .Values.studioDatachainWorker.replicaCount }} {{- else }} replicas: 0 {{- end }} {{- end }} - {{- with .Values.studioDvcxWorker.strategy }} + {{- with .Values.studioDatachainWorker.strategy }} strategy: {{- toYaml . | nindent 4 }} {{- end }} selector: matchLabels: - {{- include "studio-dvcx-worker.selectorLabels" . | nindent 6 }} + {{- include "studio-datachain-worker.selectorLabels" . | nindent 6 }} template: metadata: annotations: - checksum/configmap-studio-dvcx-worker: {{ include (print $.Template.BasePath "/configmap-studio-dvcx-worker.yaml") . | sha256sum }} + checksum/configmap-studio-datachain-worker: {{ include (print $.Template.BasePath "/configmap-studio-datachain-worker.yaml") . | sha256sum }} {{- include "studio.checksum" . | indent 8 }} - {{- with .Values.studioDvcxWorker.podAnnotations }} + {{- with .Values.studioDatachainWorker.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "studio-dvcx-worker.selectorLabels" . | nindent 8 }} + {{- include "studio-datachain-worker.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} - serviceAccountName: {{ include "studio-dvcx-worker.serviceAccountName" . }} + serviceAccountName: {{ include "studio-datachain-worker.serviceAccountName" . }} terminationGracePeriodSeconds: 150 securityContext: fsGroup: 103 fsGroupChangePolicy: "OnRootMismatch" - {{- with .Values.studioDvcxWorker.podSecurityContext }} + {{- with .Values.studioDatachainWorker.podSecurityContext }} {{- toYaml . | nindent 8 }} {{- end }} containers: - - name: studio-dvcx-worker + - name: studio-datachain-worker securityContext: - {{- toYaml .Values.studioDvcxWorker.securityContext | nindent 12 }} - image: "{{ .Values.studioDvcxWorker.image.repository }}:{{ .Values.studioDvcxWorker.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.studioDvcxWorker.image.pullPolicy }} + {{- toYaml .Values.studioDatachainWorker.securityContext | nindent 12 }} + image: "{{ .Values.studioDatachainWorker.image.repository }}:{{ .Values.studioDatachainWorker.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.studioDatachainWorker.image.pullPolicy }} args: ["/app/bin/run_celery_worker_udf.sh"] resources: - {{- toYaml .Values.studioDvcxWorker.resources | nindent 12 }} + {{- toYaml .Values.studioDatachainWorker.resources | nindent 12 }} env: - name: "NO_MIGRATE_DB" value: "1" @@ -60,16 +60,16 @@ spec: - configMapRef: name: studio - configMapRef: - name: {{ .Release.Name }}-dvcx-worker + name: {{ .Release.Name }}-datachain-worker - secretRef: name: studio {{- if .Values.global.envFromSecret }} - secretRef: name: {{ .Values.global.envFromSecret }} {{- end }} - {{- if .Values.studioDvcxWorker.envFromSecret }} + {{- if .Values.studioDatachainWorker.envFromSecret }} - secretRef: - name: {{ .Values.studioDvcxWorker.envFromSecret }} + name: {{ .Values.studioDatachainWorker.envFromSecret }} {{- end }} livenessProbe: exec: @@ -77,7 +77,7 @@ spec: - python - -c - 'from viewer.utils import sqlalchemy_liveness_probe; sqlalchemy_liveness_probe()' - {{- $livenessProbe := .Values.studioDvcxWorker.livenessProbe | default dict }} + {{- $livenessProbe := .Values.studioDatachainWorker.livenessProbe | default dict }} initialDelaySeconds: {{ $livenessProbe.initialDelaySeconds | default 10 }} periodSeconds: {{ $livenessProbe.periodSeconds | default 10 }} timeoutSeconds: {{ $livenessProbe.timeoutSeconds | default 10 }} @@ -90,7 +90,7 @@ spec: mountPath: /usr/local/share/ca-certificates - name: tmp-ephemeral mountPath: /tmp/shared - {{- if .Values.studioDvcxWorker.localStorage }} + {{- if .Values.studioDatachainWorker.localStorage }} - name: tmp-local mountPath: /tmp/local {{- end }} @@ -104,31 +104,31 @@ spec: configMap: name: studio-ca-certificates - name: tmp-ephemeral - {{- if eq .Values.studioDvcxWorker.ephemeralStorage.type "ephemeral" }} + {{- if eq .Values.studioDatachainWorker.ephemeralStorage.type "ephemeral" }} ephemeral: volumeClaimTemplate: metadata: labels: - type: {{.Release.Name}}-{{ .Values.studioDvcxWorker.ephemeralStorage.persistentVolumeClaim.claimName }} + type: {{.Release.Name}}-{{ .Values.studioDatachainWorker.ephemeralStorage.persistentVolumeClaim.claimName }} spec: accessModes: [ "ReadWriteOnce" ] - {{- if .Values.studioDvcxWorker.ephemeralStorage.persistentVolumeClaim.storageClass }} - storageClassName: {{ .Values.studioDvcxWorker.ephemeralStorage.persistentVolumeClaim.storageClass }} + {{- if .Values.studioDatachainWorker.ephemeralStorage.persistentVolumeClaim.storageClass }} + storageClassName: {{ .Values.studioDatachainWorker.ephemeralStorage.persistentVolumeClaim.storageClass }} {{- end }} resources: requests: - storage: {{ .Values.studioDvcxWorker.ephemeralStorage.size }} - {{- else if eq .Values.studioDvcxWorker.ephemeralStorage.type "pvc" }} + storage: {{ .Values.studioDatachainWorker.ephemeralStorage.size }} + {{- else if eq .Values.studioDatachainWorker.ephemeralStorage.type "pvc" }} persistentVolumeClaim: - claimName: {{ .Values.studioDvcxWorker.ephemeralStorage.persistentVolumeClaim.claimName }} - {{- else if eq .Values.studioDvcxWorker.ephemeralStorage.type "pvcRWX" }} + claimName: {{ .Values.studioDatachainWorker.ephemeralStorage.persistentVolumeClaim.claimName }} + {{- else if eq .Values.studioDatachainWorker.ephemeralStorage.type "pvcRWX" }} persistentVolumeClaim: - claimName: {{.Release.Name}}-studio-dvcx-worker-ephemeral-rwx - {{- else if eq .Values.studioDvcxWorker.ephemeralStorage.type "emptyDir"}} + claimName: {{.Release.Name}}-studio-datachain-worker-ephemeral-rwx + {{- else if eq .Values.studioDatachainWorker.ephemeralStorage.type "emptyDir"}} emptyDir: - sizeLimit: {{ .Values.studioDvcxWorker.ephemeralStorage.size }} + sizeLimit: {{ .Values.studioDatachainWorker.ephemeralStorage.size }} {{- end }} - {{- with .Values.studioDvcxWorker.localStorage }} + {{- with .Values.studioDatachainWorker.localStorage }} - name: tmp-local {{- if eq .type "ephemeral" }} ephemeral: @@ -152,15 +152,15 @@ spec: sizeLimit: {{ .size }} {{- end }} {{- end }} - {{- with .Values.studioDvcxWorker.nodeSelector }} + {{- with .Values.studioDatachainWorker.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.studioDvcxWorker.affinity }} + {{- with .Values.studioDatachainWorker.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.studioDvcxWorker.tolerations }} + {{- with .Values.studioDatachainWorker.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/studio/templates/hpa-studio-datachain-worker.yaml b/charts/studio/templates/hpa-studio-datachain-worker.yaml new file mode 100644 index 00000000..75940c22 --- /dev/null +++ b/charts/studio/templates/hpa-studio-datachain-worker.yaml @@ -0,0 +1,47 @@ +{{- if .Values.studioDatachainWorker.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{.Release.Name}}-datachain-worker + labels: + {{- include "studio-datachain-worker.labels" . | nindent 4 }} + {{- with .Values.studioDatachainWorker.autoscaling.annotations }} + annotations: {{ toYaml . | nindent 4 }} + {{- end }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{.Release.Name}}-datachain-worker + {{- if ((.Values.global.datachain).udfEnabled) }} + minReplicas: {{ .Values.studioDatachainWorker.autoscaling.minReplicas }} + maxReplicas: {{ .Values.studioDatachainWorker.autoscaling.maxReplicas }} + {{- else }} + minReplicas: 0 + maxReplicas: 0 + {{- end}} + metrics: + {{- if .Values.studioDatachainWorker.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.studioDatachainWorker.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} + {{- if .Values.studioDatachainWorker.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.studioDatachainWorker.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- with .Values.studioDatachainWorker.autoscaling.template }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.studioDatachainWorker.autoscaling.behavior }} + behavior: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/studio/templates/hpa-studio-dvcx-worker.yaml b/charts/studio/templates/hpa-studio-dvcx-worker.yaml deleted file mode 100644 index 83e1dbaa..00000000 --- a/charts/studio/templates/hpa-studio-dvcx-worker.yaml +++ /dev/null @@ -1,47 +0,0 @@ -{{- if .Values.studioDvcxWorker.autoscaling.enabled }} -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{.Release.Name}}-dvcx-worker - labels: - {{- include "studio-dvcx-worker.labels" . | nindent 4 }} - {{- with .Values.studioDvcxWorker.autoscaling.annotations }} - annotations: {{ toYaml . | nindent 4 }} - {{- end }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{.Release.Name}}-dvcx-worker - {{- if ((.Values.global.dvcx).udfEnabled) }} - minReplicas: {{ .Values.studioDvcxWorker.autoscaling.minReplicas }} - maxReplicas: {{ .Values.studioDvcxWorker.autoscaling.maxReplicas }} - {{- else }} - minReplicas: 0 - maxReplicas: 0 - {{- end}} - metrics: - {{- if .Values.studioDvcxWorker.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - target: - type: Utilization - averageUtilization: {{ .Values.studioDvcxWorker.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} - {{- if .Values.studioDvcxWorker.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: {{ .Values.studioDvcxWorker.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- with .Values.studioDvcxWorker.autoscaling.template }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.studioDvcxWorker.autoscaling.behavior }} - behavior: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/studio/templates/pvc-studio-datachain-worker.yaml b/charts/studio/templates/pvc-studio-datachain-worker.yaml new file mode 100644 index 00000000..7fb41590 --- /dev/null +++ b/charts/studio/templates/pvc-studio-datachain-worker.yaml @@ -0,0 +1,15 @@ +{{- if eq .Values.studioDatachainWorker.ephemeralStorage.type "pvcRWX" }} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{.Release.Name}}-studio-datachain-worker-ephemeral-rwx + labels: + {{- include "studio-datachain-worker.labels" . | nindent 4 }} +spec: + accessModes: + - ReadWriteMany + storageClassName: {{ .Values.studioDatachainWorker.ephemeralStorage.persistentVolumeClaim.storageClass }} + resources: + requests: + storage: {{ .Values.studioDatachainWorker.ephemeralStorage.size }} +{{- end }} diff --git a/charts/studio/templates/pvc-studio-dvcx-worker.yaml b/charts/studio/templates/pvc-studio-dvcx-worker.yaml deleted file mode 100644 index f6f12505..00000000 --- a/charts/studio/templates/pvc-studio-dvcx-worker.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if eq .Values.studioDvcxWorker.ephemeralStorage.type "pvcRWX" }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{.Release.Name}}-studio-dvcx-worker-ephemeral-rwx - labels: - {{- include "studio-dvcx-worker.labels" . | nindent 4 }} -spec: - accessModes: - - ReadWriteMany - storageClassName: {{ .Values.studioDvcxWorker.ephemeralStorage.persistentVolumeClaim.storageClass }} - resources: - requests: - storage: {{ .Values.studioDvcxWorker.ephemeralStorage.size }} -{{- end }} diff --git a/charts/studio/templates/secret-studio.yaml b/charts/studio/templates/secret-studio.yaml index 853dc6d9..0c21afaf 100644 --- a/charts/studio/templates/secret-studio.yaml +++ b/charts/studio/templates/secret-studio.yaml @@ -70,10 +70,10 @@ stringData: BITBUCKET_CLIENT_ID: {{ .Values.global.scmProviders.bitbucket.clientId | quote }} {{- end }} - {{- $dvcx := .Values.global.dvcx | default dict }} - {{- $dvcxClickhouse := $dvcx.clickHouse | default dict }} - {{- if $dvcxClickhouse.dsn }} - DVCX_CH_DSN: {{ $dvcxClickhouse.dsn | quote }} + {{- $datachain := .Values.global.datachain | default dict }} + {{- $datachainClickhouse := $datachain.clickHouse | default dict }} + {{- if $datachainClickhouse.dsn }} + DATACHAIN_CH_DSN: {{ $datachainClickhouse.dsn | quote }} {{- else if .Values.clickhouse.enabled }} - DVCX_CH_DSN: clickhouse+native://{{ .Values.clickhouse.auth.username }}:{{ .Values.clickhouse.auth.password }}@{{ .Values.clickhouse.fullnameOverride }}.{{ .Release.Namespace }}.svc.cluster.local/default?secure=False + DATACHAIN_CH_DSN: clickhouse+native://{{ .Values.clickhouse.auth.username }}:{{ .Values.clickhouse.auth.password }}@{{ .Values.clickhouse.fullnameOverride }}.{{ .Release.Namespace }}.svc.cluster.local/default?secure=False {{- end }} diff --git a/charts/studio/templates/serviceaccount-datachain-worker.yaml b/charts/studio/templates/serviceaccount-datachain-worker.yaml new file mode 100644 index 00000000..7357b7e9 --- /dev/null +++ b/charts/studio/templates/serviceaccount-datachain-worker.yaml @@ -0,0 +1,12 @@ +{{- if ((.Values.studioDatachainWorker).serviceAccount).create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "studio-datachain-worker.serviceAccountName" . }} + labels: + {{- include "studio-datachain-worker.labels" . | nindent 4 }} + {{- with .Values.studioDatachainWorker.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/studio/templates/serviceaccount-dvcx-worker.yaml b/charts/studio/templates/serviceaccount-dvcx-worker.yaml deleted file mode 100644 index 2d0acebd..00000000 --- a/charts/studio/templates/serviceaccount-dvcx-worker.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if ((.Values.studioDvcxWorker).serviceAccount).create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "studio-dvcx-worker.serviceAccountName" . }} - labels: - {{- include "studio-dvcx-worker.labels" . | nindent 4 }} - {{- with .Values.studioDvcxWorker.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/studio/values.yaml b/charts/studio/values.yaml index 0c95a6b0..5743f7e6 100644 --- a/charts/studio/values.yaml +++ b/charts/studio/values.yaml @@ -80,8 +80,8 @@ global: # -- Celery result URL resultBackend: "" - # -- Studio: Settings related to DVCX - dvcx: {} + # -- Studio: Settings related to DataChain + datachain: {} ingress: enabled: true @@ -281,8 +281,7 @@ pgBouncer: # envVars: # DEBUG: "True" - # -- The name of an existing Secret that contains sensitive environment variables passed to DVCx - # worker pods. + # -- The name of an existing Secret that contains sensitive environment variables. envFromSecret: "" replicaCount: 1 @@ -652,41 +651,41 @@ studioWorker: storageClass: "" -# -- Studio DVCx Worker settings group -studioDvcxWorker: +# -- Studio DataChain Worker settings group +studioDatachainWorker: - # -- DVCx worker image settings + # -- DataChain worker image settings image: - # -- DVCx worker image repository - repository: docker.iterative.ai/studio-dvcx-worker - # -- DVCx worker image pull policy + # -- DataChain worker image repository + repository: docker.iterative.ai/studio-datachain-worker + # -- DataChain worker image pull policy pullPolicy: IfNotPresent # -- Overrides the image tag whose default is the chart appVersion. # tag: "v1.34.0" - # -- Additional environment variables for DVCx worker pods + # -- Additional environment variables for DataChain worker pods envVars: {} # Example: # envVars: # DEBUG: "True" - # -- The name of an existing Secret that contains sensitive environment variables passed to DVCx - # worker pods. + # -- The name of an existing Secret that contains sensitive environment variables passed to + # DataChain worker pods. envFromSecret: "" replicaCount: 1 - # -- DVCx worker log level + # -- DataChain worker log level logLevel: "info" - # -- DVCx worker resources configuration + # -- DataChain worker resources configuration resources: - # -- DVCx worker requests configuration + # -- DataChain worker requests configuration requests: cpu: 1000m memory: 3Gi ephemeral-storage: 10Gi - # -- DVCx worker limits configuration + # -- DataChain worker limits configuration limits: memory: 16Gi ephemeral-storage: 20Gi @@ -700,7 +699,7 @@ studioDvcxWorker: # -- Persistent Volume Claim configuration for ephemeral storage (if type is set `pvc`) persistentVolumeClaim: # -- Persistent Volume Claim name, to mount externally managed PVC (`ephemeralStorage.type` has to be set to `pvc`) - claimName: "dvcx-worker" + claimName: "datachain-worker" # -- Persistent Volume Claim `storageClass` name, by default it will use the default `storageClass`(not used when `pvc` is set as type) storageClass: "" @@ -713,41 +712,41 @@ studioDvcxWorker: # -- Persistent Volume Claim configuration for local storage persistentVolumeClaim: # -- Persistent Volume Claim name, to mount externally managed PVC (`localStorage.type` has to be set to `pvc`) - claimName: "dvcx-worker-local" + claimName: "datachain-worker-local" # -- Persistent Volume Claim `storageClass` name, by default it will use the default `storageClass`(not used when `pvc` is set as type) storageClass: "" - # -- DVCx worker deployment strategy + # -- DataChain worker deployment strategy strategy: rollingUpdate: maxUnavailable: 0 maxSurge: 25% # livenessProbe: -# # -- DVCx worker liveness probe `initialDelaySeconds` +# # -- DataChain worker liveness probe `initialDelaySeconds` # initialDelaySeconds: 10 -# # -- DVCx worker liveness probe `periodSeconds` +# # -- DataChain worker liveness probe `periodSeconds` # periodSeconds: 10 -# # -- DVCx worker liveness probe `timeoutSeconds` +# # -- DataChain worker liveness probe `timeoutSeconds` # timeoutSeconds: 10 - # -- DVCx worker autoscaling configuration + # -- DataChain worker autoscaling configuration autoscaling: - # -- DVCx worker autoscaling enabled flag + # -- DataChain worker autoscaling enabled flag enabled: false - # -- DVCx worker autoscaling min replicas + # -- DataChain worker autoscaling min replicas minReplicas: 1 - # -- DVCx worker autoscaling max replicas + # -- DataChain worker autoscaling max replicas maxReplicas: 5 - # -- DVCx worker autoscaling target CPU utilization percentage + # -- DataChain worker autoscaling target CPU utilization percentage targetCPUUtilizationPercentage: 80 - # -- DVCx worker autoscaling target memory utilization percentage + # -- DataChain worker autoscaling target memory utilization percentage # targetMemoryUtilizationPercentage: 80 # -- Worker autoscaling annotation annotations: {} - # -- DVCx worker Custom or additional autoscaling metrics + # -- DataChain worker Custom or additional autoscaling metrics # Custom or additional autoscaling metrics # ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-custom-metrics template: [] @@ -762,7 +761,7 @@ studioDvcxWorker: # type: Value # value: "1" - # -- DVCx worker autoscaling behavior + # -- DataChain worker autoscaling behavior behavior: {} # scaleUp: # stabilizationWindowSeconds: 15 @@ -780,14 +779,14 @@ studioDvcxWorker: # value: 1 # periodSeconds: 60 - # -- Additional DVCx worker pod annotations + # -- Additional DataChain worker pod annotations podAnnotations: {} - # -- DVCx worker pod security context configuration + # -- DataChain worker pod security context configuration podSecurityContext: {} # fsGroup: 2000 - # -- DVCx worker pod security context configuration + # -- DataChain worker pod security context configuration securityContext: {} # capabilities: # drop: @@ -796,13 +795,13 @@ studioDvcxWorker: # runAsNonRoot: true # runAsUser: 1000 - # -- DVCx worker pod node selector configuration + # -- DataChain worker pod node selector configuration nodeSelector: {} - # -- DVCx worker pod tolerations configuration + # -- DataChain worker pod tolerations configuration tolerations: [] - # -- DVCx worker pod affinity configuration + # -- DataChain worker pod affinity configuration affinity: {} serviceAccount: