Skip to content

Commit

Permalink
feat: support custom directory configuration (#32)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Dec 9, 2021
1 parent 110c286 commit 5d49bdd
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 23 deletions.
15 changes: 8 additions & 7 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/en/images/logo/dragonfly.svg
type: application
version: "0.5.24"
appVersion: "0.5.24"
version: "0.5.25"
appVersion: "0.5.25"
keywords:
- dragonfly
- d7y
Expand All @@ -18,21 +18,22 @@ sources:

annotations:
artifacthub.io/changes: |
- Update image version to v2.0.1
- Update image version to v2.0.2-alpha.2
- Support custom directory configuration
artifacthub.io/links: |
- name: Chart Source
url: https://github.com/dragonflyoss/helm-charts
- name: Source
url: https://github.com/dragonflyoss/Dragonfly2
artifacthub.io/images: |
- name: manager
image: dragonflyoss/manager:v2.0.1
image: dragonflyoss/manager:v2.0.2-alpha.2
- name: cdn
image: dragonflyoss/cdn:v2.0.1
image: dragonflyoss/cdn:v2.0.2-alpha.2
- name: dfdaemon
image: dragonflyoss/dfdaemon:v2.0.1
image: dragonflyoss/dfdaemon:v2.0.2-alpha.2
- name: scheduler
image: dragonflyoss/scheduler:v2.0.1
image: dragonflyoss/scheduler:v2.0.2-alpha.2
dependencies:
- name: mysql
Expand Down
17 changes: 11 additions & 6 deletions charts/dragonfly/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dragonfly Helm Chart

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

Provide efficient, stable, secure, low-cost file and image distribution services to be the best practice and standard solution in the related Cloud-Native area.

Expand Down Expand Up @@ -127,6 +127,7 @@ helm delete dragonfly --namespace dragonfly-system
| cdn.config.base.gcInitialDelay | string | `"6s"` | Delay time from the start to the first GC execution |
| cdn.config.base.gcMetaInterval | string | `"2m"` | Interval time to execute GC meta |
| cdn.config.base.gcStorageInterval | string | `"15s"` | Interval time to execute GC storage |
| cdn.config.base.logDir | string | `""` | Log storage directory |
| cdn.config.base.manager.cdnClusterID | int | `1` | Associated cdn cluster id |
| cdn.config.base.manager.keepAlive.interval | string | `"5s"` | Manager keepalive interval |
| cdn.config.base.maxBandwidth | string | `"200M"` | Network bandwidth that cdn can use |
Expand Down Expand Up @@ -173,7 +174,7 @@ helm delete dragonfly --namespace dragonfly-system
| cdn.resources | object | `{"limits":{"cpu":"4","memory":"8Gi"},"requests":{"cpu":"0","memory":"0"}}` | Pod resource requests and limits |
| cdn.service | object | `{"extraPorts":[{"name":"http-nginx","port":8001,"targetPort":8001}],"port":8003,"targetPort":8003,"type":"ClusterIP"}` | Service configuration |
| cdn.statefulsetAnnotations | object | `{}` | Statefulset annotations |
| cdn.tag | string | `"v2.0.1"` | Image tag |
| cdn.tag | string | `"v2.0.2-alpha.2"` | Image tag |
| cdn.terminationGracePeriodSeconds | string | `nil` | Pod terminationGracePeriodSeconds |
| cdn.tolerations | list | `[]` | List of node taints to tolerate |
| clusterDomain | string | `"cluster.local"` | Install application cluster domain |
Expand All @@ -194,7 +195,7 @@ helm delete dragonfly --namespace dragonfly-system
| containerRuntime.docker.skipHosts | list | `["127.0.0.1","docker.io"]` | Skip hosts Some traffic did not redirect to dragonfly, like 127.0.0.1, and the image registries of dragonfly itself. The format likes NO_PROXY in golang, refer: https://github.com/golang/net/blob/release-branch.go1.15/http/httpproxy/proxy.go#L39. Caution: Some registries use s3 or oss for backend storage, when add registries to skipHosts, don't forget add the corresponding backend storage. |
| containerRuntime.initContainerImage | string | `"dragonflyoss/openssl"` | The image name of init container, need include openssl for ca generating |
| dfdaemon.config.aliveTime | string | `"0s"` | Daemon alive time, when sets 0s, daemon will not auto exit, it is useful for longtime running |
| dfdaemon.config.dataDir | string | `"/root/.dragonfly/dfget-daemon/"` | Data directory |
| dfdaemon.config.cacheDir | string | `""` | Dynconfig cache storage directory |
| dfdaemon.config.download.calculateDigest | bool | `true` | Calculate digest, when only pull images, can be false to save cpu and memory |
| dfdaemon.config.download.downloadGRPC.security | object | `{"insecure":true}` | Download grpc security option |
| dfdaemon.config.download.downloadGRPC.unixListen | object | `{"socket":"/tmp/dfdamon.sock"}` | Download service listen address current, only support unix domain socket |
Expand All @@ -212,6 +213,7 @@ helm delete dragonfly --namespace dragonfly-system
| dfdaemon.config.host.securityDomain | string | `""` | Security domain deployed by daemon, network isolation between different security domains |
| dfdaemon.config.jaeger | string | `""` | Jaeger url, like: http://jaeger.dragonfly.svc:14268/api/traces |
| dfdaemon.config.keepStorage | bool | `false` | When daemon exit, keep peer task data or not it is usefully when upgrade daemon service, all local cache will be saved default is false |
| dfdaemon.config.logDir | string | `""` | Log storage directory |
| dfdaemon.config.pprofPort | int | `0` | |
| dfdaemon.config.proxy.defaultFilter | string | `"Expires&Signature"` | Filter for hash url when defaultFilter: "Expires&Signature", for example: http://localhost/xyz?Expires=111&Signature=222 and http://localhost/xyz?Expires=333&Signature=999 is same task |
| dfdaemon.config.proxy.proxies[0] | object | `{"regx":"blobs/sha256.*"}` | Proxy all http image layer download requests with dfget |
Expand All @@ -236,6 +238,7 @@ helm delete dragonfly --namespace dragonfly-system
| dfdaemon.config.upload.tcpListen.listen | string | `"0.0.0.0"` | Listen address |
| dfdaemon.config.upload.tcpListen.port | int | `65002` | Listen port |
| dfdaemon.config.verbose | bool | `true` | When enable, pprof will be enabled |
| dfdaemon.config.workHome | string | `"/usr/local/dragonfly"` | Daemon work directory |
| dfdaemon.containerPort | int | `65001` | Pod containerPort |
| dfdaemon.daemonsetAnnotations | object | `{}` | Daemonset annotations |
| dfdaemon.enable | bool | `true` | Enable dfdaemon |
Expand All @@ -255,7 +258,7 @@ helm delete dragonfly --namespace dragonfly-system
| dfdaemon.priorityClassName | string | `""` | Pod priorityClassName |
| dfdaemon.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| dfdaemon.resources | object | `{"limits":{"cpu":"2","memory":"2Gi"},"requests":{"cpu":"0","memory":"0"}}` | Pod resource requests and limits |
| dfdaemon.tag | string | `"v2.0.1"` | Image tag |
| dfdaemon.tag | string | `"v2.0.2-alpha.2"` | 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 @@ -313,7 +316,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.0.1"` | Image tag |
| manager.tag | string | `"v2.0.2-alpha.2"` | 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 All @@ -337,6 +340,8 @@ helm delete dragonfly --namespace dragonfly-system
| scheduler.config.jaeger | string | `""` | Jaeger url, like: http://jaeger.dragonfly.svc:14268/api/traces |
| scheduler.config.manager.keepAlive.interval | string | `"5s"` | Manager keepalive interval |
| scheduler.config.manager.schedulerClusterID | int | `1` | Associated scheduler cluster id |
| scheduler.config.server.cacheDir | string | `""` | Dynconfig cache storage directory |
| scheduler.config.server.logDir | string | `""` | Log storage directory |
| scheduler.config.worker | object | `{"senderJobPoolSize":10000,"senderNum":10,"workerJobPoolSize":10000,"workerNum":4}` | Scheduling queue configuration |
| scheduler.containerPort | int | `8002` | Pod containerPort |
| scheduler.enable | bool | `true` | Enable scheduler |
Expand Down Expand Up @@ -369,7 +374,7 @@ helm delete dragonfly --namespace dragonfly-system
| scheduler.replicas | int | `3` | Number of Pods to launch |
| scheduler.resources | object | `{"limits":{"cpu":"4","memory":"8Gi"},"requests":{"cpu":"0","memory":"0"}}` | Pod resource requests and limits |
| scheduler.statefulsetAnnotations | object | `{}` | Statefulset annotations |
| scheduler.tag | string | `"v2.0.1"` | Image tag |
| scheduler.tag | string | `"v2.0.2-alpha.2"` | Image tag |
| scheduler.terminationGracePeriodSeconds | string | `nil` | Pod terminationGracePeriodSeconds |
| scheduler.tolerations | list | `[]` | List of node taints to tolerate |

Expand Down
1 change: 1 addition & 0 deletions charts/dragonfly/templates/cdn/cdn-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ data:
gcStorageInterval: {{ .Values.cdn.config.base.gcStorageInterval }}
taskExpireTime: {{ .Values.cdn.config.base.taskExpireTime }}
storagePattern: {{ .Values.cdn.config.base.storagePattern }}
logDir: {{ .Values.cdn.config.base.logDir }}
nodeSelector:
{{ toYaml .Values.cdn.nodeSelector | indent 8 }}
manager:
Expand Down
5 changes: 3 additions & 2 deletions charts/dragonfly/templates/dfdaemon/dfdaemon-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ data:
aliveTime: {{ .Values.dfdaemon.config.aliveTime }}
gcInterval: {{ .Values.dfdaemon.config.gcInterval }}
keepStorage: {{ .Values.dfdaemon.config.keepStorage }}
dataDir: {{ .Values.dfdaemon.config.dataDir }}
workDir: {{ .Values.dfdaemon.config.dataDir }}
workHome: {{ .Values.dfdaemon.config.workHome }}
cacheDir: {{ .Values.dfdaemon.config.cacheDir }}
logDir: {{ .Values.dfdaemon.config.logDir }}
verbose: {{ .Values.dfdaemon.config.verbose }}
{{- if .Values.dfdaemon.config.verbose }}
pprof-port: {{ .Values.dfdaemon.config.pprofPort }}
Expand Down
4 changes: 2 additions & 2 deletions charts/dragonfly/templates/dfdaemon/dfdaemon-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ spec:
- name: run
mountPath: /run/dragonfly
- name: data
mountPath: {{ .Values.dfdaemon.config.dataDir }}
mountPath: {{ .Values.dfdaemon.config.workHome }}
securityContext:
capabilities:
add:
Expand Down Expand Up @@ -501,7 +501,7 @@ spec:
- name: data
{{- if .Values.dfdaemon.mountDataDirAsHostPath }}
hostPath:
path: {{ .Values.dfdaemon.config.dataDir }}
path: {{ .Values.dfdaemon.config.workHome }}
type: DirectoryOrCreate
{{- else }}
emptyDir: {}
Expand Down
2 changes: 2 additions & 0 deletions charts/dragonfly/templates/scheduler/scheduler-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ data:
deubug: {{ .Values.scheduler.config.debug }}
server:
port: {{ .Values.scheduler.containerPort }}
cacheDir: {{ .Values.scheduler.config.cacheDir }}
logDir: {{ .Values.scheduler.config.logDir }}
worker:
{{ toYaml .Values.scheduler.config.worker | indent 6 }}
dynconfig:
Expand Down
23 changes: 17 additions & 6 deletions charts/dragonfly/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ scheduler:
# -- Image repository
image: dragonflyoss/scheduler
# -- Image tag
tag: v2.0.1
tag: v2.0.2-alpha.2
# -- Image pull policy
pullPolicy: IfNotPresent
# -- Host Aliases
Expand Down Expand Up @@ -171,6 +171,11 @@ scheduler:
config:
# -- Enable debug mode
debug: false
server:
# -- Dynconfig cache storage directory
cacheDir: ""
# -- Log storage directory
logDir: ""
# -- Scheduling queue configuration
worker:
workerNum: 4
Expand Down Expand Up @@ -231,7 +236,7 @@ cdn:
# -- Image repository
image: dragonflyoss/cdn
# -- Image tag
tag: v2.0.1
tag: v2.0.2-alpha.2
# -- Image pull policy
pullPolicy: IfNotPresent
# -- Host Aliases
Expand Down Expand Up @@ -324,6 +329,8 @@ cdn:
taskExpireTime: 3m
# -- Pattern of storage policy
storagePattern: disk
# -- Log storage directory
logDir: ""
manager:
# -- Associated cdn cluster id
cdnClusterID: 1
Expand Down Expand Up @@ -395,7 +402,7 @@ dfdaemon:
# -- Image repository
image: dragonflyoss/dfdaemon
# -- Image tag
tag: v2.0.1
tag: v2.0.2-alpha.2
# -- Image pull policy
pullPolicy: IfNotPresent
# -- Host Aliases
Expand Down Expand Up @@ -453,8 +460,12 @@ dfdaemon:
# it is usefully when upgrade daemon service, all local cache will be saved
# default is false
keepStorage: false
# -- Data directory
dataDir: /root/.dragonfly/dfget-daemon/
# -- Daemon work directory
workHome: "/usr/local/dragonfly"
# -- Dynconfig cache storage directory
cacheDir: ""
# -- Log storage directory
logDir: ""
# -- When enable, pprof will be enabled
verbose: true
pprofPort: 0
Expand Down Expand Up @@ -584,7 +595,7 @@ manager:
# -- Image repository
image: dragonflyoss/manager
# -- Image tag
tag: v2.0.1
tag: v2.0.2-alpha.2
# -- Image pull policy
pullPolicy: IfNotPresent
# -- Host Aliases
Expand Down

0 comments on commit 5d49bdd

Please sign in to comment.