Skip to content

Commit

Permalink
Create job quota for DataChain jobs (#485)
Browse files Browse the repository at this point in the history
* Create job quota for DataChain jobs

* Update values.yaml

* Update values.yaml

* Update Chart.yaml

* Update README.md

* Update jobquota-datachain-worker.yaml

* Helm-Docs update

* Update Chart.yaml

* Helm-Docs update

---------

Co-authored-by: 0x2b3bfa0 <[email protected]>
  • Loading branch information
0x2b3bfa0 and 0x2b3bfa0 authored Nov 28, 2024
1 parent 6149fe4 commit 58d295a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/studio/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: studio
description: A Helm chart for Kubernetes
type: application
version: 0.16.57
version: 0.16.58
appVersion: "v2.148.3"
maintainers:
- name: iterative
Expand Down
5 changes: 3 additions & 2 deletions charts/studio/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# studio

![Version: 0.16.57](https://img.shields.io/badge/Version-0.16.57-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.148.3](https://img.shields.io/badge/AppVersion-v2.148.3-informational?style=flat-square)
![Version: 0.16.58](https://img.shields.io/badge/Version-0.16.58-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.148.3](https://img.shields.io/badge/AppVersion-v2.148.3-informational?style=flat-square)

A Helm chart for Kubernetes

Expand Down Expand Up @@ -139,7 +139,7 @@ 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 |
| 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":"50Gi","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}},"terminationGracePeriodSeconds":180,"tolerations":[]}` | Studio DataChain Worker settings group |
| 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"},"jobQuota":10,"localStorage":{"persistentVolumeClaim":{"claimName":"datachain-worker-local","storageClass":""},"size":"50Gi","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}},"terminationGracePeriodSeconds":180,"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 |
Expand All @@ -160,6 +160,7 @@ A Helm chart for Kubernetes
| 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.jobQuota | int | `10` | DataChain worker job quota |
| studioDatachainWorker.localStorage | object | `{"persistentVolumeClaim":{"claimName":"datachain-worker-local","storageClass":""},"size":"50Gi","type":"ephemeral"}` | Local storage configuration (used for storing DataChain virtual environments) |
| 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`) |
Expand Down
11 changes: 11 additions & 0 deletions charts/studio/templates/jobquota-datachain-worker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if (.Values.studioDatachainWorker).jobQuota -}}
apiVersion: v1
kind: ResourceQuota
metadata:
name: studio-datachain-worker-job-quota
labels:
{{- include "studio-datachain-worker.labels" . | nindent 4 }}
spec:
hard:
count/jobs.batch: {{ .Values.studioDatachainWorker.jobQuota }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/studio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,9 @@ studioDatachainWorker:
# -- DataChain worker log level
logLevel: "info"

# -- DataChain worker job quota
jobQuota: 10

# -- DataChain worker resources configuration
resources:
# -- DataChain worker requests configuration
Expand Down

0 comments on commit 58d295a

Please sign in to comment.