From 29d294f29dce440660e59d874811d33d3936cc58 Mon Sep 17 00:00:00 2001 From: Marcin Jasion Date: Wed, 23 Aug 2023 13:03:53 +0200 Subject: [PATCH] fix(dvcx-worker): Disable dvcx-workers when udf is disabled --- charts/studio/Chart.yaml | 2 +- charts/studio/README.md | 2 +- charts/studio/templates/deployment-studio-dvcx-worker.yaml | 4 ++++ charts/studio/templates/hpa-studio-dvcx-worker.yaml | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/studio/Chart.yaml b/charts/studio/Chart.yaml index 6b45d76b..b78c62b4 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.4.5 +version: 0.5.0 appVersion: "v2.27.0" maintainers: - name: iterative diff --git a/charts/studio/README.md b/charts/studio/README.md index 17a6262e..144c8c32 100644 --- a/charts/studio/README.md +++ b/charts/studio/README.md @@ -1,6 +1,6 @@ # studio -![Version: 0.4.5](https://img.shields.io/badge/Version-0.4.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.27.0](https://img.shields.io/badge/AppVersion-v2.27.0-informational?style=flat-square) +![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.27.0](https://img.shields.io/badge/AppVersion-v2.27.0-informational?style=flat-square) A Helm chart for Kubernetes diff --git a/charts/studio/templates/deployment-studio-dvcx-worker.yaml b/charts/studio/templates/deployment-studio-dvcx-worker.yaml index 2804693f..62726e0d 100644 --- a/charts/studio/templates/deployment-studio-dvcx-worker.yaml +++ b/charts/studio/templates/deployment-studio-dvcx-worker.yaml @@ -6,7 +6,11 @@ metadata: {{- include "studio-dvcx-worker.labels" . | nindent 4 }} spec: {{- if not .Values.studioDvcxWorker.autoscaling.enabled }} + {{- if ((.Values.dvcx).udfEnabled) }} replicas: {{ .Values.studioDvcxWorker.replicaCount }} + {{- else }} + replicas: 0 + {{- end }} {{- end }} selector: matchLabels: diff --git a/charts/studio/templates/hpa-studio-dvcx-worker.yaml b/charts/studio/templates/hpa-studio-dvcx-worker.yaml index 85be815b..980a3896 100644 --- a/charts/studio/templates/hpa-studio-dvcx-worker.yaml +++ b/charts/studio/templates/hpa-studio-dvcx-worker.yaml @@ -10,8 +10,13 @@ spec: apiVersion: apps/v1 kind: Deployment name: studio-dvcx-worker + {{- if ((.Values.dvcx).udfEnabled) }} minReplicas: {{ .Values.studioDvcxWorker.autoscaling.minReplicas }} maxReplicas: {{ .Values.studioDvcxWorker.autoscaling.maxReplicas }} + {{- else }} + minReplicas: 0 + maxReplicas: 0 + {{- end}} metrics: {{- if .Values.studioDvcxWorker.autoscaling.targetCPUUtilizationPercentage }} - type: Resource