Skip to content

Commit

Permalink
feat: add updateStrategy to client, manager, scheduler, seed-client a…
Browse files Browse the repository at this point in the history
…nd seed-peer (#230)

Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Jan 19, 2024
1 parent ebebef2 commit d450e58
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/dragonfly/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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.26
version: 1.1.27
appVersion: 2.1.30
keywords:
- dragonfly
Expand All @@ -26,7 +26,7 @@ sources:

annotations:
artifacthub.io/changes: |
- add updateStrategy support for dfdaemon
- Add updateStrategy to client, manager, scheduler, seed-client and seed-peer.
artifacthub.io/links: |
- name: Chart Source
Expand Down
8 changes: 7 additions & 1 deletion charts/dragonfly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ helm delete dragonfly --namespace dragonfly-system
| client.tag | string | `"v0.1.13"` | Image tag. |
| client.terminationGracePeriodSeconds | string | `nil` | Pod terminationGracePeriodSeconds. |
| client.tolerations | list | `[]` | List of node taints to tolerate. |
| client.updateStrategy | object | `{}` | Update strategy for replicas. |
| clusterDomain | string | `"cluster.local"` | Install application cluster domain. |
| containerRuntime | object | `{"containerd":{"configFileName":"","configPathDir":"/etc/containerd","enable":false,"injectConfigPath":false,"injectRegistryCredencials":{"auth":"","enable":false,"identitytoken":"","password":"","username":""},"registries":["https://ghcr.io","https://quay.io","https://harbor.example.com:8443"]},"crio":{"enable":false,"registries":["https://ghcr.io","https://quay.io","https://harbor.example.com:8443"]},"docker":{"caCert":{"commonName":"Dragonfly Authority CA","countryName":"CN","localityName":"Hangzhou","organizationName":"Dragonfly","stateOrProvinceName":"Hangzhou"},"enable":false,"injectHosts":true,"insecure":false,"registryDomains":["ghcr.io","quay.io"],"registryPorts":[443],"restart":false,"skipHosts":["127.0.0.1","docker.io"]},"extraInitContainers":[],"initContainerImage":"dragonflyoss/openssl"}` | [Experimental] Container runtime support. Choose special container runtime in Kubernetes. Support: Containerd, Docker, CRI-O. |
| containerRuntime.containerd | object | `{"configFileName":"","configPathDir":"/etc/containerd","enable":false,"injectConfigPath":false,"injectRegistryCredencials":{"auth":"","enable":false,"identitytoken":"","password":"","username":""},"registries":["https://ghcr.io","https://quay.io","https://harbor.example.com:8443"]}` | [Experimental] Containerd support. |
Expand Down Expand Up @@ -309,7 +310,7 @@ helm delete dragonfly --namespace dragonfly-system
| dfdaemon.tag | string | `"v2.1.30"` | Image tag. |
| dfdaemon.terminationGracePeriodSeconds | string | `nil` | Pod terminationGracePeriodSeconds. |
| dfdaemon.tolerations | list | `[]` | List of node taints to tolerate. |
| dfdaemon.updateStrategy | object | `{}` | updateStrategy config for dfdaemon. |
| dfdaemon.updateStrategy | object | `{}` | Update strategy for replicas. |
| externalManager.grpcPort | int | `65003` | External GRPC service port. |
| externalManager.host | string | `nil` | External manager hostname. |
| externalManager.restPort | int | `8080` | External REST service port. |
Expand Down Expand Up @@ -420,6 +421,7 @@ helm delete dragonfly --namespace dragonfly-system
| manager.tag | string | `"v2.1.30"` | Image tag. |
| manager.terminationGracePeriodSeconds | string | `nil` | Pod terminationGracePeriodSeconds. |
| manager.tolerations | list | `[]` | List of node taints to tolerate. |
| manager.updateStrategy | object | `{"type":"RollingUpdate"}` | Update strategy for replicas. |
| mysql.auth.database | string | `"manager"` | Mysql database name. |
| mysql.auth.host | string | `""` | Mysql hostname. |
| mysql.auth.password | string | `"dragonfly"` | Mysql password. |
Expand Down Expand Up @@ -524,6 +526,7 @@ helm delete dragonfly --namespace dragonfly-system
| scheduler.tag | string | `"v2.1.30"` | Image tag. |
| scheduler.terminationGracePeriodSeconds | string | `nil` | Pod terminationGracePeriodSeconds. |
| scheduler.tolerations | list | `[]` | List of node taints to tolerate. |
| scheduler.updateStrategy | object | `{}` | Update strategy for replicas. |
| seedClient.config.download.concurrentPieceCount | int | `10` | concurrentPieceCount is the number of concurrent pieces to download. |
| seedClient.config.download.pieceTimeout | string | `"30s"` | pieceTimeout is the timeout for downloading a piece from source. |
| seedClient.config.download.server.socketPath | string | `"/var/run/dragonfly/dfdaemon.sock"` | socketPath is the unix socket path for dfdaemon GRPC service. |
Expand Down Expand Up @@ -590,6 +593,7 @@ helm delete dragonfly --namespace dragonfly-system
| seedClient.tag | string | `"v0.1.13"` | Image tag. |
| seedClient.terminationGracePeriodSeconds | string | `nil` | Pod terminationGracePeriodSeconds. |
| seedClient.tolerations | list | `[]` | List of node taints to tolerate. |
| seedClient.updateStrategy | object | `{}` | Update strategy for replicas. |
| seedPeer.config.aliveTime | string | `"0s"` | Daemon alive time, when sets 0s, daemon will not auto exit, it is useful for longtime running. |
| seedPeer.config.announcer.schedulerInterval | string | `"30s"` | schedulerInterval is the interval of announcing scheduler. Announcer will provide the scheduler with peer information for scheduling. Peer information includes cpu, memory, etc. |
| seedPeer.config.cacheDir | string | `""` | Dynconfig cache directory. |
Expand Down Expand Up @@ -692,6 +696,7 @@ helm delete dragonfly --namespace dragonfly-system
| seedPeer.tag | string | `"v2.1.30"` | Image tag. |
| seedPeer.terminationGracePeriodSeconds | string | `nil` | Pod terminationGracePeriodSeconds. |
| seedPeer.tolerations | list | `[]` | List of node taints to tolerate. |
| seedPeer.updateStrategy | object | `{}` | Update strategy for replicas. |
| trainer.config.console | bool | `false` | Console shows log on console. |
| trainer.config.jaeger | string | `""` | |
| trainer.config.manager.Addr | string | `"127.0.0.1:65003"` | Manager Service Address. |
Expand Down Expand Up @@ -751,6 +756,7 @@ helm delete dragonfly --namespace dragonfly-system
| trainer.tag | string | `"v2.1.30"` | Image tag. |
| trainer.terminationGracePeriodSeconds | string | `nil` | Pod terminationGracePeriodSeconds. |
| trainer.tolerations | list | `[]` | List of node taints to tolerate. |
| trainer.updateStrategy | object | `{"type":"RollingUpdate"}` | Update strategy for replicas. |
| triton.aws | object | `{"accessKeyID":"","region":"","secretAccessKey":""}` | Credentials information. |
| triton.enable | bool | `false` | Enable triton. |
| triton.fullnameOverride | string | `""` | Override triton fullname. |
Expand Down
4 changes: 4 additions & 0 deletions charts/dragonfly/templates/client/client-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ metadata:
{{ toYaml .Values.client.daemonsetAnnotations | indent 4 }}
{{- end }}
spec:
{{- if .Values.client.updateStrategy }}
updateStrategy:
{{ toYaml .Values.client.updateStrategy | indent 4 }}
{{- end }}
selector:
matchLabels:
app: {{ template "dragonfly.fullname" . }}
Expand Down
3 changes: 3 additions & 0 deletions charts/dragonfly/templates/manager/manager-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ metadata:
{{ toYaml .Values.manager.deploymentAnnotations | indent 4 }}
{{- end }}
spec:
{{- if .Values.manager.updateStrategy }}
strategy: {{- toYaml .Values.manager.updateStrategy | nindent 4 }}
{{- end }}
replicas: {{ .Values.manager.replicas }}
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ metadata:
{{ toYaml .Values.scheduler.statefulsetAnnotations | indent 4 }}
{{- end }}
spec:
{{- if .Values.scheduler.updateStrategy }}
updateStrategy:
{{ toYaml .Values.scheduler.updateStrategy | indent 4 }}
{{- end }}
replicas: {{ .Values.scheduler.replicas }}
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ metadata:
{{ toYaml .Values.seedClient.statefulsetAnnotations | indent 4 }}
{{- end }}
spec:
{{- if .Values.seedClient.updateStrategy }}
updateStrategy:
{{ toYaml .Values.seedClient.updateStrategy | indent 4 }}
{{- end }}
replicas: {{ .Values.seedClient.replicas }}
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ metadata:
{{ toYaml .Values.seedPeer.statefulsetAnnotations | indent 4 }}
{{- end }}
spec:
{{- if .Values.seedPeer.updateStrategy }}
updateStrategy:
{{ toYaml .Values.seedPeer.updateStrategy | indent 4 }}
{{- end }}
replicas: {{ .Values.seedPeer.replicas }}
selector:
matchLabels:
Expand Down
3 changes: 3 additions & 0 deletions charts/dragonfly/templates/trainer/trainer-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ metadata:
{{ toYaml .Values.trainer.deploymentAnnotations | indent 4 }}
{{- end }}
spec:
{{- if .Values.trainer.updateStrategy }}
strategy: {{- toYaml .Values.trainer.updateStrategy | nindent 4 }}
{{- end }}
replicas: {{ .Values.trainer.replicas }}
selector:
matchLabels:
Expand Down
16 changes: 15 additions & 1 deletion charts/dragonfly/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ manager:
podAnnotations: {}
# -- Pod labels.
podLabels: {}
# -- Update strategy for replicas.
updateStrategy:
type: RollingUpdate
# -- Deployment annotations.
deploymentAnnotations: {}
# -- Extra volumes for manager.
Expand Down Expand Up @@ -453,6 +456,8 @@ scheduler:
podAnnotations: {}
# -- Pod labels.
podLabels: {}
# -- Update strategy for replicas.
updateStrategy: {}
# -- Statefulset annotations.
statefulsetAnnotations: {}
# -- Pod containerPort.
Expand Down Expand Up @@ -819,6 +824,8 @@ seedClient:
podAnnotations: {}
# -- Pod labels.
podLabels: {}
# -- Update strategy for replicas.
updateStrategy: {}
# -- Statefulset annotations.
statefulsetAnnotations: {}
initContainer:
Expand Down Expand Up @@ -1021,6 +1028,8 @@ client:
podAnnotations: {}
# -- Pod labels.
podLabels: {}
# -- Update strategy for replicas.
updateStrategy: {}
# -- Statefulset annotations.
statefulsetAnnotations: {}
initContainer:
Expand Down Expand Up @@ -1196,6 +1205,8 @@ seedPeer:
podAnnotations: {}
# -- Pod labels.
podLabels: {}
# -- Update strategy for replicas.
updateStrategy: {}
# -- Statefulset annotations.
statefulsetAnnotations: {}
initContainer:
Expand Down Expand Up @@ -1542,7 +1553,7 @@ dfdaemon:
podAnnotations: {}
# -- Pod labels.
podLabels: {}
# -- updateStrategy config for dfdaemon.
# -- Update strategy for replicas.
updateStrategy: {}
# -- Daemonset annotations.
daemonsetAnnotations: {}
Expand Down Expand Up @@ -1985,6 +1996,9 @@ trainer:
podAnnotations: {}
# -- Pod labels.
podLabels: {}
# -- Update strategy for replicas.
updateStrategy:
type: RollingUpdate
# -- Deployment annotations.
deploymentAnnotations: {}
# -- Pod containerPort.
Expand Down

0 comments on commit d450e58

Please sign in to comment.