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