Skip to content

Commit

Permalink
feat: add maxProcs to service (#204)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Nov 8, 2023
1 parent ccaddfc commit 1bc1ea4
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 18 deletions.
16 changes: 8 additions & 8 deletions charts/dragonfly/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: dragonfly
description: Dragonfly is an intelligent P2P based image and file distribution system
icon: https://raw.githubusercontent.com/dragonflyoss/Dragonfly2/main/docs/images/logo/dragonfly.svg
type: application
version: 1.1.9
appVersion: 2.1.16
version: 1.1.10
appVersion: 2.1.21
keywords:
- dragonfly
- d7y
Expand All @@ -26,8 +26,8 @@ sources:

annotations:
artifacthub.io/changes: |
- Add syncPeers configuration to manager.
- Update dragonfly image tag to v2.1.16.
- Add maxProcs configuration to service.
- Update dragonfly image tag to v2.1.21.
artifacthub.io/links: |
- name: Chart Source
Expand All @@ -36,13 +36,13 @@ annotations:
url: https://github.com/dragonflyoss/Dragonfly2
artifacthub.io/images: |
- name: manager
image: dragonflyoss/manager:v2.1.16
image: dragonflyoss/manager:v2.1.21
- name: dfdaemon
image: dragonflyoss/dfdaemon:v2.1.16
image: dragonflyoss/dfdaemon:v2.1.21
- name: scheduler
image: dragonflyoss/scheduler:v2.1.16
image: dragonflyoss/scheduler:v2.1.21
- name: trainer
image: dragonflyoss/scheduler:v2.1.16
image: dragonflyoss/scheduler:v2.1.21
- name: triton
image: nvcr.io/nvidia/tritonserver:23.06-py3
Expand Down
16 changes: 11 additions & 5 deletions charts/dragonfly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ helm delete dragonfly --namespace dragonfly-system
| dfdaemon.initContainer.image | string | `"busybox"` | Init container image repository. |
| dfdaemon.initContainer.pullPolicy | string | `"Always"` | |
| dfdaemon.initContainer.tag | string | `"latest"` | Init container image tag. |
| dfdaemon.maxProcs | string | `""` | maxProcs Limits the number of operating system threads that can execute user-level. Go code simultaneously by setting GOMAXPROCS environment variable, refer to https://golang.org/pkg/runtime. |
| dfdaemon.metrics.enable | bool | `false` | Enable peer metrics. |
| dfdaemon.metrics.prometheusRule.additionalLabels | object | `{}` | Additional labels. |
| dfdaemon.metrics.prometheusRule.enable | bool | `false` | Enable prometheus rule. ref: https://github.com/coreos/prometheus-operator. |
Expand All @@ -247,7 +248,7 @@ helm delete dragonfly --namespace dragonfly-system
| dfdaemon.pullPolicy | string | `"IfNotPresent"` | Image pull policy. |
| dfdaemon.pullSecrets | list | `[]` (defaults to global.imagePullSecrets). | Image pull secrets. |
| dfdaemon.resources | object | `{"limits":{"cpu":"2","memory":"2Gi"},"requests":{"cpu":"0","memory":"0"}}` | Pod resource requests and limits. |
| dfdaemon.tag | string | `"v2.1.16"` | Image tag. |
| dfdaemon.tag | string | `"v2.1.21"` | Image tag. |
| dfdaemon.terminationGracePeriodSeconds | string | `nil` | Pod terminationGracePeriodSeconds. |
| dfdaemon.tolerations | list | `[]` | List of node taints to tolerate. |
| externalManager.grpcPort | int | `65003` | External GRPC service port. |
Expand Down Expand Up @@ -332,6 +333,7 @@ helm delete dragonfly --namespace dragonfly-system
| manager.initContainer.image | string | `"busybox"` | Init container image repository. |
| manager.initContainer.pullPolicy | string | `"Always"` | Container image pull policy. |
| manager.initContainer.tag | string | `"latest"` | Init container image tag. |
| manager.maxProcs | string | `""` | maxProcs Limits the number of operating system threads that can execute user-level. Go code simultaneously by setting GOMAXPROCS environment variable, refer to https://golang.org/pkg/runtime. |
| manager.metrics.enable | bool | `false` | Enable manager metrics. |
| manager.metrics.prometheusRule.additionalLabels | object | `{}` | Additional labels. |
| manager.metrics.prometheusRule.enable | bool | `false` | Enable prometheus rule. ref: https://github.com/coreos/prometheus-operator. |
Expand All @@ -357,7 +359,7 @@ helm delete dragonfly --namespace dragonfly-system
| manager.service.annotations | object | `{}` | Service annotations. |
| manager.service.labels | object | `{}` | Service labels. |
| manager.service.type | string | `"ClusterIP"` | Service type. |
| manager.tag | string | `"v2.1.16"` | Image tag. |
| manager.tag | string | `"v2.1.21"` | Image tag. |
| manager.terminationGracePeriodSeconds | string | `nil` | Pod terminationGracePeriodSeconds. |
| manager.tolerations | list | `[]` | List of node taints to tolerate. |
| mysql.auth.database | string | `"manager"` | Mysql database name. |
Expand Down Expand Up @@ -434,6 +436,7 @@ helm delete dragonfly --namespace dragonfly-system
| scheduler.initContainer.image | string | `"busybox"` | Init container image repository. |
| scheduler.initContainer.pullPolicy | string | `"Always"` | Container image pull policy. |
| scheduler.initContainer.tag | string | `"latest"` | Init container image tag. |
| scheduler.maxProcs | string | `""` | maxProcs Limits the number of operating system threads that can execute user-level. Go code simultaneously by setting GOMAXPROCS environment variable, refer to https://golang.org/pkg/runtime. |
| scheduler.metrics.enable | bool | `false` | Enable scheduler metrics. |
| scheduler.metrics.enableHost | bool | `false` | Enable host metrics. |
| scheduler.metrics.prometheusRule.additionalLabels | object | `{}` | Additional labels. |
Expand All @@ -460,7 +463,7 @@ helm delete dragonfly --namespace dragonfly-system
| scheduler.service.labels | object | `{}` | Service labels. |
| scheduler.service.type | string | `"ClusterIP"` | Service type. |
| scheduler.statefulsetAnnotations | object | `{}` | Statefulset annotations. |
| scheduler.tag | string | `"v2.1.16"` | Image tag. |
| scheduler.tag | string | `"v2.1.21"` | Image tag. |
| scheduler.terminationGracePeriodSeconds | string | `nil` | Pod terminationGracePeriodSeconds. |
| scheduler.tolerations | list | `[]` | List of node taints to tolerate. |
| seedPeer.config.aliveTime | string | `"0s"` | Daemon alive time, when sets 0s, daemon will not auto exit, it is useful for longtime running. |
Expand Down Expand Up @@ -535,6 +538,7 @@ helm delete dragonfly --namespace dragonfly-system
| seedPeer.initContainer.image | string | `"busybox"` | Init container image repository. |
| seedPeer.initContainer.pullPolicy | string | `"Always"` | Container image pull policy. |
| seedPeer.initContainer.tag | string | `"latest"` | Init container image tag. |
| seedPeer.maxProcs | string | `""` | maxProcs Limits the number of operating system threads that can execute user-level. Go code simultaneously by setting GOMAXPROCS environment variable, refer to https://golang.org/pkg/runtime. |
| seedPeer.metrics.enable | bool | `false` | Enable seed peer metrics. |
| seedPeer.metrics.prometheusRule.additionalLabels | object | `{}` | Additional labels. |
| seedPeer.metrics.prometheusRule.enable | bool | `false` | Enable prometheus rule ref: https://github.com/coreos/prometheus-operator. |
Expand All @@ -561,7 +565,7 @@ helm delete dragonfly --namespace dragonfly-system
| seedPeer.replicas | int | `3` | Number of Pods to launch. |
| seedPeer.resources | object | `{"limits":{"cpu":"2","memory":"4Gi"},"requests":{"cpu":"0","memory":"0"}}` | Pod resource requests and limits. |
| seedPeer.statefulsetAnnotations | object | `{}` | Statefulset annotations. |
| seedPeer.tag | string | `"v2.1.16"` | Image tag. |
| seedPeer.tag | string | `"v2.1.21"` | Image tag. |
| seedPeer.terminationGracePeriodSeconds | string | `nil` | Pod terminationGracePeriodSeconds. |
| seedPeer.tolerations | list | `[]` | List of node taints to tolerate. |
| trainer.config.console | bool | `false` | Console shows log on console. |
Expand Down Expand Up @@ -595,6 +599,7 @@ helm delete dragonfly --namespace dragonfly-system
| trainer.initContainer.image | string | `"busybox"` | Init container image repository. |
| trainer.initContainer.pullPolicy | string | `"Always"` | Container image pull policy. |
| trainer.initContainer.tag | string | `"latest"` | Init container image tag. |
| trainer.maxProcs | string | `""` | maxProcs Limits the number of operating system threads that can execute user-level. Go code simultaneously by setting GOMAXPROCS environment variable, refer to https://golang.org/pkg/runtime. |
| trainer.metrics.enable | bool | `false` | Enable trainer metrics. |
| trainer.metrics.prometheusRule.additionalLabels | object | `{}` | Additional labels. |
| trainer.metrics.prometheusRule.enable | bool | `false` | Enable prometheus rule. ref: https://github.com/coreos/prometheus-operator. |
Expand All @@ -619,14 +624,15 @@ helm delete dragonfly --namespace dragonfly-system
| trainer.service.annotations | object | `{}` | Service annotations. |
| trainer.service.labels | object | `{}` | Service labels. |
| trainer.service.type | string | `"ClusterIP"` | Service type. |
| trainer.tag | string | `"v2.1.16"` | Image tag. |
| trainer.tag | string | `"v2.1.21"` | Image tag. |
| trainer.terminationGracePeriodSeconds | string | `nil` | Pod terminationGracePeriodSeconds. |
| trainer.tolerations | list | `[]` | List of node taints to tolerate. |
| triton.aws | object | `{"accessKeyID":"","region":"","secretAccessKey":""}` | Credentials information. |
| triton.enable | bool | `false` | Enable triton. |
| triton.fullnameOverride | string | `""` | Override triton fullname. |
| triton.grpcPort | int | `8001` | GRPC service port. |
| triton.image | string | `"nvcr.io/nvidia/tritonserver"` | Image repository. |
| triton.maxProcs | string | `""` | maxProcs Limits the number of operating system threads that can execute user-level. Go code simultaneously by setting GOMAXPROCS environment variable, refer to https://golang.org/pkg/runtime. |
| triton.modelRepositoryPath | string | `""` | Model repository path. |
| triton.name | string | `"triton"` | triton name. |
| triton.nameOverride | string | `""` | Override triton name. |
Expand Down
5 changes: 5 additions & 0 deletions charts/dragonfly/templates/dfdaemon/dfdaemon-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ spec:
imagePullPolicy: {{ .Values.dfdaemon.pullPolicy | quote }}
resources:
{{ toYaml .Values.dfdaemon.resources | indent 12 }}
env:
{{- if .Values.dfdaemon.maxProcs }}
- name: GOMAXPROCS
value: {{ .Values.dfdaemon.maxProcs }}
{{- end }}
ports:
- containerPort: {{ .Values.dfdaemon.containerPort }}
{{- if and (not .Values.dfdaemon.hostNetwork) (empty .Values.dfdaemon.config.proxy.tcpListen.namespace) }}
Expand Down
5 changes: 5 additions & 0 deletions charts/dragonfly/templates/manager/manager-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ spec:
imagePullPolicy: {{ .Values.manager.pullPolicy | quote }}
resources:
{{ toYaml .Values.manager.resources | indent 12 }}
env:
{{- if .Values.manager.maxProcs }}
- name: GOMAXPROCS
value: {{ .Values.manager.maxProcs }}
{{- end }}
ports:
- containerPort: {{ .Values.manager.restPort }}
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ spec:
imagePullPolicy: {{ .Values.scheduler.pullPolicy | quote }}
resources:
{{ toYaml .Values.scheduler.resources | indent 12 }}
env:
{{- if .Values.scheduler.maxProcs }}
- name: GOMAXPROCS
value: {{ .Values.scheduler.maxProcs }}
{{- end }}
ports:
- containerPort: {{ .Values.scheduler.containerPort }}
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ spec:
imagePullPolicy: {{ .Values.seedPeer.pullPolicy | quote }}
resources:
{{ toYaml .Values.seedPeer.resources | indent 12 }}
env:
{{- if .Values.seedPeer.maxProcs }}
- name: GOMAXPROCS
value: {{ .Values.seedPeer.maxProcs }}
{{- end }}
ports:
- containerPort: {{ .Values.seedPeer.config.download.peerGRPC.tcpListen.port }}
protocol: TCP
Expand Down
5 changes: 5 additions & 0 deletions charts/dragonfly/templates/trainer/trainer-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ spec:
imagePullPolicy: {{ .Values.trainer.pullPolicy | quote }}
resources:
{{ toYaml .Values.trainer.resources | indent 12 }}
env:
{{- if .Values.trainer.maxProcs }}
- name: GOMAXPROCS
value: {{ .Values.trainer.maxProcs }}
{{- end }}
ports:
- containerPort: {{ .Values.trainer.containerPort }}
protocol: TCP
Expand Down
4 changes: 4 additions & 0 deletions charts/dragonfly/templates/triton/triton-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ spec:
"--model-control-mode=poll",
"--repository-poll-secs=5"]
env:
{{- if .Values.triton.maxProcs }}
- name: GOMAXPROCS
value: {{ .Values.triton.maxProcs }}
{{- end }}
- name: DEFAULT_REGION
valueFrom:
secretKeyRef:
Expand Down
28 changes: 23 additions & 5 deletions charts/dragonfly/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,15 @@ scheduler:
nameOverride: ""
# -- Override scheduler fullname.
fullnameOverride: ""
# -- maxProcs Limits the number of operating system threads that can execute user-level.
# Go code simultaneously by setting GOMAXPROCS environment variable, refer to https://golang.org/pkg/runtime.
maxProcs: ""
# -- Number of Pods to launch.
replicas: 3
# -- Image repository.
image: dragonflyoss/scheduler
# -- Image tag.
tag: v2.1.16
tag: v2.1.21
# -- Image pull policy.
pullPolicy: IfNotPresent
# -- Image pull secrets.
Expand Down Expand Up @@ -507,12 +510,15 @@ seedPeer:
nameOverride: ""
# -- Override scheduler fullname.
fullnameOverride: ""
# -- maxProcs Limits the number of operating system threads that can execute user-level.
# Go code simultaneously by setting GOMAXPROCS environment variable, refer to https://golang.org/pkg/runtime.
maxProcs: ""
# -- Number of Pods to launch.
replicas: 3
# -- Image repository.
image: dragonflyoss/dfdaemon
# -- Image tag.
tag: v2.1.16
tag: v2.1.21
# -- Image pull policy.
pullPolicy: IfNotPresent
# -- Image pull secrets.
Expand Down Expand Up @@ -852,10 +858,13 @@ dfdaemon:
nameOverride: ""
# -- Override dfdaemon fullname.
fullnameOverride: ""
# -- maxProcs Limits the number of operating system threads that can execute user-level.
# Go code simultaneously by setting GOMAXPROCS environment variable, refer to https://golang.org/pkg/runtime.
maxProcs: ""
# -- Image repository.
image: dragonflyoss/dfdaemon
# -- Image tag.
tag: v2.1.16
tag: v2.1.21
# -- Image pull policy.
pullPolicy: IfNotPresent
# -- Image pull secrets.
Expand Down Expand Up @@ -1187,12 +1196,15 @@ manager:
nameOverride: ""
# -- Override manager fullname.
fullnameOverride: ""
# -- maxProcs Limits the number of operating system threads that can execute user-level.
# Go code simultaneously by setting GOMAXPROCS environment variable, refer to https://golang.org/pkg/runtime.
maxProcs: ""
# -- Number of Pods to launch.
replicas: 3
# -- Image repository.
image: dragonflyoss/manager
# -- Image tag.
tag: v2.1.16
tag: v2.1.21
# -- Image pull policy.
pullPolicy: IfNotPresent
# -- Image pull secrets.
Expand Down Expand Up @@ -1553,12 +1565,15 @@ trainer:
nameOverride: ""
# -- Override trainer fullname.
fullnameOverride: ""
# -- maxProcs Limits the number of operating system threads that can execute user-level.
# Go code simultaneously by setting GOMAXPROCS environment variable, refer to https://golang.org/pkg/runtime.
maxProcs: ""
# -- Number of Pods to launch.
replicas: 1
# -- Image repository.
image: dragonflyoss/trainer
# -- Image tag.
tag: v2.1.16
tag: v2.1.21
# -- Image pull policy.
pullPolicy: IfNotPresent
# -- Image pull secrets.
Expand Down Expand Up @@ -1747,6 +1762,9 @@ triton:
nameOverride: ""
# -- Override triton fullname.
fullnameOverride: ""
# -- maxProcs Limits the number of operating system threads that can execute user-level.
# Go code simultaneously by setting GOMAXPROCS environment variable, refer to https://golang.org/pkg/runtime.
maxProcs: ""
# -- Number of Pods to launch.
replicas: 3
# -- Image repository.
Expand Down

0 comments on commit 1bc1ea4

Please sign in to comment.