diff --git a/deploy/charts/dragonfly/templates/cdn-configmap.yaml b/deploy/charts/dragonfly/templates/cdn/cdn-configmap.yaml similarity index 96% rename from deploy/charts/dragonfly/templates/cdn-configmap.yaml rename to deploy/charts/dragonfly/templates/cdn/cdn-configmap.yaml index 4752f6b2854..0953577b767 100644 --- a/deploy/charts/dragonfly/templates/cdn-configmap.yaml +++ b/deploy/charts/dragonfly/templates/cdn/cdn-configmap.yaml @@ -73,7 +73,7 @@ data: server { listen {{ .Values.cdn.service.nginxTargetPort }}; location / { - root {{ .Values.cdn.config.plugins.storage.config.baseDir }}; + root {{ (index .Values.cdn.config.plugins.storageDriver 0).config.baseDir }}; } } } diff --git a/deploy/charts/dragonfly/templates/cdn/cdn-rabc.yaml b/deploy/charts/dragonfly/templates/cdn/cdn-rabc.yaml new file mode 100644 index 00000000000..2d4b000ff3b --- /dev/null +++ b/deploy/charts/dragonfly/templates/cdn/cdn-rabc.yaml @@ -0,0 +1,33 @@ +{{- if .Values.scheduler.config.staticCDN }} +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{template "dragonfly.cdn.fullname" . }}-role + namespace: {{ .Values.installation.namespace }} +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - update + - patch + +--- + +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{template "dragonfly.cdn.fullname" . }}-role-binding + namespace: {{ .Values.installation.namespace }} +roleRef: + kind: Role + name: {{template "dragonfly.cdn.fullname" . }}-role + apiGroup: rbac.authorization.k8s.io +subjects: +- kind: ServiceAccount + name: {{template "dragonfly.cdn.fullname" . }} +{{ end }} \ No newline at end of file diff --git a/deploy/charts/dragonfly/templates/cdn/cdn-serviceaccount.yaml b/deploy/charts/dragonfly/templates/cdn/cdn-serviceaccount.yaml new file mode 100644 index 00000000000..583981325fb --- /dev/null +++ b/deploy/charts/dragonfly/templates/cdn/cdn-serviceaccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{template "dragonfly.cdn.fullname" . }} + namespace: {{ .Values.installation.namespace }} \ No newline at end of file diff --git a/deploy/charts/dragonfly/templates/cdn-deploy.yaml b/deploy/charts/dragonfly/templates/cdn/cdn-statefulset.yaml similarity index 60% rename from deploy/charts/dragonfly/templates/cdn-deploy.yaml rename to deploy/charts/dragonfly/templates/cdn/cdn-statefulset.yaml index 4f1f038e589..bbf56586516 100644 --- a/deploy/charts/dragonfly/templates/cdn-deploy.yaml +++ b/deploy/charts/dragonfly/templates/cdn/cdn-statefulset.yaml @@ -1,5 +1,5 @@ apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: labels: app: {{ template "dragonfly.cdn.fullname" . }} @@ -9,9 +9,9 @@ metadata: release: {{ .Release.Name }} name: {{ template "dragonfly.cdn.fullname" . }} namespace: {{ .Values.installation.namespace }} - {{- if .Values.cdn.deploymentAnnotations }} + {{- if .Values.cdn.statefulsetAnnotations }} annotations: -{{ toYaml .Values.cdn.deploymentAnnotations | indent 4 }} +{{ toYaml .Values.cdn.statefulsetAnnotations | indent 4 }} {{- end }} spec: replicas: {{ .Values.cdn.replicas }} @@ -20,6 +20,7 @@ spec: app: {{ template "dragonfly.cdn.fullname" . }} component: "{{ .Values.cdn.name }}" release: {{ .Release.Name }} + serviceName: cdn template: metadata: labels: @@ -31,6 +32,7 @@ spec: {{ toYaml .Values.cdn.podAnnotations | indent 8 }} {{- end }} spec: + serviceAccountName: {{template "dragonfly.cdn.fullname" . }} {{- if .Values.cdn.nodeSelector }} nodeSelector: {{ toYaml .Values.cdn.nodeSelector | indent 8 }} @@ -66,6 +68,53 @@ spec: - name: nginx-config mountPath: "/etc/nginx/nginx.conf" subPath: "nginx.conf" + {{- if .Values.scheduler.config.staticCDN }} + initContainers: + - name: update-configmap + image: bitnami/kubectl + command: + - /bin/bash + - -xc + - | + HOSTNAME=$(cat /etc/hostname) + cat < /tmp/patch.json + { + "data": { + "$POD_NAME.json": "{\"host_info\": {\"host_name\": \"$HOSTNAME\",\"ip\":\"$POD_IP\"},\"rpc_port\": 8003,\"down_port\": 8001}" + } + } + EOF + echo data to patch: + cat /tmp/patch.json + for i in `seq 1 10`; do + kubectl -n $POD_NAMESPACE \ + patch configmap scheduler-static-cdn --type=merge \ + --patch-file /tmp/patch.json + if [[ "$?" -eq 0 ]]; then + echo updated configmap: + kubectl -n $POD_NAMESPACE get configmap scheduler-static-cdn -oyaml + break + fi + done + env: + - name: NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + imagePullPolicy: "Always" + {{- end}} volumes: - name: config configMap: diff --git a/deploy/charts/dragonfly/templates/cdn-svc.yaml b/deploy/charts/dragonfly/templates/cdn/cdn-svc.yaml similarity index 100% rename from deploy/charts/dragonfly/templates/cdn-svc.yaml rename to deploy/charts/dragonfly/templates/cdn/cdn-svc.yaml diff --git a/deploy/charts/dragonfly/templates/dfdaemon-configmap.yaml b/deploy/charts/dragonfly/templates/dfdaemon/dfdaemon-configmap.yaml similarity index 52% rename from deploy/charts/dragonfly/templates/dfdaemon-configmap.yaml rename to deploy/charts/dragonfly/templates/dfdaemon/dfdaemon-configmap.yaml index 919457efc69..5ffbcb087be 100644 --- a/deploy/charts/dragonfly/templates/dfdaemon-configmap.yaml +++ b/deploy/charts/dragonfly/templates/dfdaemon/dfdaemon-configmap.yaml @@ -9,19 +9,18 @@ metadata: release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" data: - dfget-daemon.yaml: |- + dfget.yaml: |- alive_time: {{ .Values.dfdaemon.config.alive_time }} gc_interval: {{ .Values.dfdaemon.config.gc_interval }} - pid_file: {{ .Values.dfdaemon.config.pid_file }} - lock_file: {{ .Values.dfdaemon.config.lock_file }} - data_dir: {{ .Values.dfdaemon.config.data_dir }} - work_home: {{ .Values.dfdaemon.config.work_home }} keep_storage: {{ .Values.dfdaemon.config.keep_storage }} verbose: {{ .Values.dfdaemon.config.verbose }} scheduler: net_addrs: - - type: tcp - addr: {{template "dragonfly.scheduler.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.scheduler.service.port }} + {{- $count := .Values.scheduler.replicas | int}} + {{- range $i, $x := until $count }} + - type: tcp + addr: {{template "dragonfly.scheduler.fullname" $ }}-{{$i}}.{{ $.Release.Namespace }}.svc{{ $.Values.installation.clusterDomain }}:{{ $.Values.scheduler.service.port }} + {{- end }} schedule_timeout: 5m host: {{ toYaml .Values.dfdaemon.config.host | indent 6 }} @@ -32,4 +31,16 @@ data: storage: {{ toYaml .Values.dfdaemon.config.storage | indent 6 }} proxy: -{{ toYaml .Values.dfdaemon.config.proxy | indent 6 }} + tcp_listen: + {{- if not .Values.dfdaemon.hostNetwork }} + namespace: /host/ns/net + {{- end }} + listen: {{ .Values.dfdaemon.config.proxy.tcp_listen.listen }} + port: {{ .Values.dfdaemon.config.proxy.tcp_listen.port }} + security: +{{ toYaml .Values.dfdaemon.config.proxy.security | indent 8 }} + registry_mirror: +{{ toYaml .Values.dfdaemon.config.proxy.registry_mirror | indent 8 }} + proxies: +{{ toYaml .Values.dfdaemon.config.proxy.proxies | indent 8 }} + diff --git a/deploy/charts/dragonfly/templates/dfdaemon-daemonset.yaml b/deploy/charts/dragonfly/templates/dfdaemon/dfdaemon-daemonset.yaml similarity index 79% rename from deploy/charts/dragonfly/templates/dfdaemon-daemonset.yaml rename to deploy/charts/dragonfly/templates/dfdaemon/dfdaemon-daemonset.yaml index d9ed02be2c7..9312b1edca7 100644 --- a/deploy/charts/dragonfly/templates/dfdaemon-daemonset.yaml +++ b/deploy/charts/dragonfly/templates/dfdaemon/dfdaemon-daemonset.yaml @@ -9,12 +9,11 @@ metadata: component: "{{ .Values.dfdaemon.name }}" heritage: {{ .Release.Service }} release: {{ .Release.Name }} - {{- if .Values.dfdaemon.deploymentAnnotations }} + {{- if .Values.dfdaemon.daemonsetAnnotations }} annotations: -{{ toYaml .Values.dfdaemon.deploymentAnnotations | indent 4 }} +{{ toYaml .Values.dfdaemon.daemonsetAnnotations | indent 4 }} {{- end }} spec: - replicas: {{ .Values.dfdaemon.replicas }} selector: matchLabels: app: {{ template "dragonfly.dfdaemon.fullname" . }} @@ -35,6 +34,7 @@ spec: nodeSelector: {{ toYaml .Values.dfdaemon.nodeSelector | indent 8 }} {{- end }} + hostNetwork: {{ .Values.dfdaemon.hostNetwork }} {{- if .Values.dfdaemon.tolerations }} tolerations: {{ toYaml .Values.dfdaemon.tolerations | indent 8 }} @@ -55,17 +55,29 @@ spec: imagePullPolicy: {{ .Values.dfdaemon.pullPolicy | quote }} resources: {{ toYaml .Values.dfdaemon.resources | indent 12 }} + {{- if .Values.dfdaemon.hostNetwork }} ports: - containerPort: 65001 hostPort: 65001 protocol: TCP + {{- end}} volumeMounts: - name: config mountPath: "/etc/dragonfly" + {{- if not .Values.dfdaemon.hostNetwork }} + - name: netns + mountPath: /host/ns/net + securityContext: + capabilities: + add: + - SYS_ADMIN + {{- end}} volumes: - name: config configMap: name: {{ template "dragonfly.dfdaemon.fullname" . }} - items: - - key: dfget-daemon.yaml - path: dfget-daemon.yaml + {{- if not .Values.dfdaemon.hostNetwork }} + - name: netns + hostPath: + path: /proc/1/ns/net + {{- end}} diff --git a/deploy/charts/dragonfly/templates/scheduler-svc.yaml b/deploy/charts/dragonfly/templates/scheduler-svc.yaml deleted file mode 100644 index 062e7ec56c4..00000000000 --- a/deploy/charts/dragonfly/templates/scheduler-svc.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{template "dragonfly.scheduler.fullname" . }} - namespace: {{ .Values.installation.namespace }} - labels: - app: {{ template "dragonfly.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.scheduler.name }}" - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -{{- if .serviceAnnotations }} - annotations: -{{ toYaml .Values.scheduler.serviceAnnotations | indent 4 }} -{{- end }} -spec: - ports: - - port: {{.Values.scheduler.service.port}} - name: http - targetPort: {{ .Values.scheduler.service.targetPort }} - {{- if (and (eq .Values.scheduler.service.type "NodePort") (not (empty .Values.scheduler.service.nodePort))) }} - nodePort: {{.Values.scheduler.service.nodePort}} - {{- end }} -{{- range $index, $port := .Values.scheduler.service.extraPorts }} - - port: {{ $port.port }} - name: {{ $port.name }} - targetPort: {{ $port.port }} -{{- end }} - selector: - app: {{ template "dragonfly.scheduler.fullname" . }} - component: "{{ .Values.scheduler.name }}" - release: {{ .Release.Name }} - type: {{.Values.scheduler.service.type}} - {{if eq .Values.scheduler.service.type "LoadBalancer"}} -{{- if .Values.scheduler.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: -{{ toYaml .Values.scheduler.service.loadBalancerSourceRanges | indent 4 }} -{{- end }} - {{if .Values.scheduler.service.loadBalancerIP}} - loadBalancerIP: {{.Values.scheduler.serivice.loadBalancerIP}} - {{end}} - {{end}} diff --git a/deploy/charts/dragonfly/templates/scheduler-configmap.yaml b/deploy/charts/dragonfly/templates/scheduler/scheduler-configmap.yaml similarity index 60% rename from deploy/charts/dragonfly/templates/scheduler-configmap.yaml rename to deploy/charts/dragonfly/templates/scheduler/scheduler-configmap.yaml index 91164e86466..920ea051627 100644 --- a/deploy/charts/dragonfly/templates/scheduler-configmap.yaml +++ b/deploy/charts/dragonfly/templates/scheduler/scheduler-configmap.yaml @@ -15,9 +15,17 @@ data: port: {{ .Values.scheduler.containerPort }} worker: {{ toYaml .Values.scheduler.config.worker | indent 6 }} - cdn: - list: - - - cdn-name: {{template "dragonfly.cdn.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - ip: {{template "dragonfly.cdn.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - rpc-port: {{ .Values.cdn.service.port }} - download-port: {{ .Values.cdn.service.nginxPort }} + {{- if .Values.scheduler.config.staticCDN }} + dynconfig: + cdnDirPath: /opt/dragonfly/scheduler-cdn + {{- end}} + +--- + +{{- if .Values.scheduler.config.staticCDN }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: scheduler-static-cdn + namespace: {{ .Values.installation.namespace }} +{{- end}} \ No newline at end of file diff --git a/deploy/charts/dragonfly/templates/scheduler-deploy.yaml b/deploy/charts/dragonfly/templates/scheduler/scheduler-statefulset.yaml similarity index 83% rename from deploy/charts/dragonfly/templates/scheduler-deploy.yaml rename to deploy/charts/dragonfly/templates/scheduler/scheduler-statefulset.yaml index 521fae9c6d1..237fa8b902f 100644 --- a/deploy/charts/dragonfly/templates/scheduler-deploy.yaml +++ b/deploy/charts/dragonfly/templates/scheduler/scheduler-statefulset.yaml @@ -1,5 +1,5 @@ apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: labels: app: {{ template "dragonfly.scheduler.fullname" . }} @@ -9,9 +9,9 @@ metadata: release: {{ .Release.Name }} namespace: {{ .Values.installation.namespace }} name: {{ template "dragonfly.scheduler.fullname" . }} - {{- if .Values.scheduler.deploymentAnnotations }} + {{- if .Values.scheduler.statefulsetAnnotations }} annotations: -{{ toYaml .Values.scheduler.deploymentAnnotations | indent 4 }} +{{ toYaml .Values.scheduler.statefulsetAnnotations | indent 4 }} {{- end }} spec: replicas: {{ .Values.scheduler.replicas }} @@ -20,6 +20,7 @@ spec: app: {{ template "dragonfly.scheduler.fullname" . }} component: "{{ .Values.scheduler.name }}" release: {{ .Release.Name }} + serviceName: scheduler template: metadata: labels: @@ -61,6 +62,10 @@ spec: volumeMounts: - name: config mountPath: "/etc/dragonfly" + {{- if .Values.scheduler.config.staticCDN }} + - name: cdn-config + mountPath: /opt/dragonfly/scheduler-cdn + {{- end}} volumes: - name: config configMap: @@ -68,3 +73,8 @@ spec: items: - key: scheduler.yaml path: scheduler.yaml + {{- if .Values.scheduler.config.staticCDN }} + - name: cdn-config + configMap: + name: scheduler-static-cdn + {{- end}} \ No newline at end of file diff --git a/deploy/charts/dragonfly/templates/scheduler/scheduler-svc.yaml b/deploy/charts/dragonfly/templates/scheduler/scheduler-svc.yaml new file mode 100644 index 00000000000..a1ed0d2b609 --- /dev/null +++ b/deploy/charts/dragonfly/templates/scheduler/scheduler-svc.yaml @@ -0,0 +1,47 @@ +{{- $count := .Values.scheduler.replicas | int}} +{{- range $i, $x := until $count }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "dragonfly.scheduler.fullname" $ }}-{{$i}} + namespace: {{ $.Values.installation.namespace }} + labels: + app: {{ template "dragonfly.name" $ }} + chart: {{ $.Chart.Name }}-{{ $.Chart.Version }} + component: "{{ $.Values.scheduler.name }}" + heritage: {{ $.Release.Service }} + release: {{ $.Release.Name }} +{{- if $.serviceAnnotations }} + annotations: +{{ toYaml $.Values.scheduler.serviceAnnotations | indent 4 }} +{{- end }} +spec: + ports: + - port: {{$.Values.scheduler.service.port}} + name: http + targetPort: {{ $.Values.scheduler.service.targetPort }} + {{- if (and (eq $.Values.scheduler.service.type "NodePort") (not (empty $.Values.scheduler.service.nodePort))) }} + nodePort: {{$.Values.scheduler.service.nodePort}} + {{- end }} +{{- range $index, $port := $.Values.scheduler.service.extraPorts }} + - port: {{ $port.port }} + name: {{ $port.name }} + targetPort: {{ $port.port }} +{{- end }} + selector: + app: {{ template "dragonfly.scheduler.fullname" $ }} + component: "{{ $.Values.scheduler.name }}" + release: {{ $.Release.Name }} + statefulset.kubernetes.io/pod-name: {{ template "dragonfly.scheduler.fullname" $ }}-{{$i}} + type: {{$.Values.scheduler.service.type}} + {{if eq $.Values.scheduler.service.type "LoadBalancer"}} +{{- if $.Values.scheduler.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml $.Values.scheduler.service.loadBalancerSourceRanges | indent 4 }} +{{- end }} + {{if $.Values.scheduler.service.loadBalancerIP}} + loadBalancerIP: {{$.Values.scheduler.serivice.loadBalancerIP}} + {{end}} +{{end}} +--- +{{- end }} \ No newline at end of file diff --git a/deploy/charts/dragonfly/values.yaml b/deploy/charts/dragonfly/values.yaml index 6847cda1089..d3a02b3c059 100644 --- a/deploy/charts/dragonfly/values.yaml +++ b/deploy/charts/dragonfly/values.yaml @@ -3,27 +3,31 @@ fullnameOverride: "" # values for dragonfly installation installation: - namespace: kube-system + namespace: dragonfly-system + clusterDomain: "" scheduler: name: scheduler - replicas: 1 + nameOverride: "" + fullnameOverride: "" + replicas: 3 image: dragonflyoss/scheduler - tag: 0.1.0 + tag: v0.1.0-alpha.1 pullPolicy: IfNotPresent resources: requests: - cpu: "512m" - memory: "512Mi" + cpu: "0" + memory: "0" limits: - cpu: "512m" - memory: "512Mi" + cpu: "4" + memory: "8Gi" priorityClassName: "" nodeSelector: {} terminationGracePeriodSeconds: tolerations: [] podAnnotations: {} - deploymentAnnotations: {} + serviceAnnotations: {} + statefulsetAnnotations: {} containerPort: 8002 service: type: ClusterIP @@ -31,6 +35,7 @@ scheduler: port: 8002 targetPort: 8002 config: + staticCDN: true debug: false worker: worker-num: 1 @@ -42,23 +47,24 @@ cdn: name: cdn nameOverride: "" fullnameOverride: "" - replicas: 1 + replicas: 3 image: dragonflyoss/cdn - tag: 0.1.0 - pullPolicy: IfNotPresent + tag: v0.1.0-alpha.1 + kubectlImage: bitnami/kubectl + pullPolicy: Always resources: requests: - cpu: "512m" - memory: "512Mi" + cpu: "0" + memory: "0" limits: - cpu: "512m" - memory: "512Mi" + cpu: "4" + memory: "8Gi" priorityClassName: "" nodeSelector: {} terminationGracePeriodSeconds: tolerations: [] podAnnotations: {} - deploymentAnnotations: {} + statefulsetAnnotations: {} containerPort: 8003 nginxContiainerPort: 8001 service: @@ -81,71 +87,65 @@ cdn: storagePattern: disk console: false plugins: - storage: - name: disk + storageDriver: + - name: disk enable: true config: baseDir: /tmp/cdn - gcConfig: - youngGCThreshold: 100G - fullGCThreshold: 5G - cleanRatio: 1 - intervalThreshold: 2h + storageManager: + - name: disk + enable: true + config: + gcInitialDelay: 5s + gcInterval: 15s + driverConfigs: + disk: + gcConfig: + youngGCThreshold: 100G + fullGCThreshold: 5G + cleanRatio: 1 + intervalThreshold: 2h dfdaemon: name: dfdaemon nameOverride: "" fullnameOverride: "" - image: dragonflyoss/dfdaemon - tag: 0.1.0 + image: dragonflyoss/dfget + tag: v0.1.0-alpha.1 pullPolicy: IfNotPresent resources: requests: - cpu: "512m" - memory: "512Mi" + cpu: "0" + memory: "0" limits: - cpu: "512m" - memory: "512Mi" + cpu: "2" + memory: "2Gi" priorityClassName: "" nodeSelector: {} terminationGracePeriodSeconds: tolerations: [] podAnnotations: {} - deploymentAnnotations: {} + daemonsetAnnotations: {} containerPort: 65001 + hostNetwork: false config: alive_time: 0s gc_interval: 1m0s - pid_file: /tmp/dfdaemon.pid - lock_file: /tmp/dfdaemon.lock - data_dir: /tmp/dragonfly/dfdaemon/ - work_home: /tmp/dragonfly/dfdaemon/ keep_storage: false - verbose: false + verbose: true host: listen_ip: 0.0.0.0 advertise_ip: 0.0.0.0 - location: "" - idc: "" - security_domain: "" - net_topology: "" download: rate_limit: 200Mi download_grpc: security: insecure: true - cacert: "" - cert: "" - key: "" - tls_config: null unix_listen: socket: /tmp/dfdamon.sock peer_grpc: security: insecure: true - cacert: "" - cert: "" - key: "" tcp_listen: listen: 0.0.0.0 port: 65000 @@ -153,19 +153,18 @@ dfdaemon: rate_limit: 100Mi security: insecure: true - cacert: "" - cert: "" - key: "" tcp_listen: listen: 0.0.0.0 port: 65002 storage: task_expire_time: 3m0s strategy: io.d7y.storage.v2.simple + multiplex: true proxy: security: insecure: true tcp_listen: + namespace: /host/ns/net listen: 0.0.0.0 port: 65001 registry_mirror: diff --git a/docs/en/ecosystem/Kubernetes-with-Dragonfly.md b/docs/en/ecosystem/Kubernetes-with-Dragonfly.md index d1c63890dfb..58a6d17a6e2 100644 --- a/docs/en/ecosystem/Kubernetes-with-Dragonfly.md +++ b/docs/en/ecosystem/Kubernetes-with-Dragonfly.md @@ -6,7 +6,7 @@ daemon as `DaemonSets`. Table of contents: * [Kustomize](#kustomize-support) -* [TODO Helm](#helm-support) +* [Helm](#helm-support) * [TODO Upgrade Guide](#upgrade-guide) ## Kustomize Support @@ -79,4 +79,34 @@ kubectl -n dragonfly exec -it ${pod_name} -- grep "peer task done" /var/log/drag Example output: ``` {"level":"info","ts":"2021-06-28 06:02:30.924","caller":"peer/peertask_stream_callback.go:77","msg":"stream peer task done, cost: 2838ms","peer":"172.17.0.9-1-ed7a32ae-3f18-4095-9f54-6ccfc248b16e","task":"3c658c488fd0868847fab30976c2a079d8fd63df148fb3b53fd1a418015723d7","component":"streamPeerTask"} -``` \ No newline at end of file +``` + +## Helm Support + +### Clone Chart + +```shell +git clone https://github.com/dragonflyoss/Dragonfly2.git +``` + +### Install + +```shell +kubectl create ns dragonfly-system +helm install --namespace dragonfly-system dragonfly Dragonfly2/deploy/charts/dragonfly +``` + +### Wait Dragonfly Ready + +Wait all pods running + +``` +kubectl -n dragonfly-system wait --for=condition=ready --all --timeout=10m pod +``` + +### Next Steps + +Following [Configure Runtime](#configure-runtime) to configure runtime. +Following [Using Dragonfly](#using-dragonfly) to use Dragonfly. + +## Upgrade Guide \ No newline at end of file