From 6b0ff5d420a4d61225de11d815663c412e0f398e Mon Sep 17 00:00:00 2001 From: Jim Ma Date: Wed, 30 Jun 2021 18:07:32 +0800 Subject: [PATCH] feature: update helm charts deploy guide (#386) Signed-off-by: Jim Ma --- .../templates/cdn/cdn-configmap.yaml | 2 +- .../en/ecosystem/Kubernetes-with-Dragonfly.md | 34 +++++++++++++++++-- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/deploy/charts/dragonfly/templates/cdn/cdn-configmap.yaml b/deploy/charts/dragonfly/templates/cdn/cdn-configmap.yaml index edd80b3fcee..0953577b767 100644 --- a/deploy/charts/dragonfly/templates/cdn/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 {{ with $s := index .Values.cdn.config.plugins.storageDriver 0 }}{{ $s.config.baseDir }} {{ end -}}; + root {{ (index .Values.cdn.config.plugins.storageDriver 0).config.baseDir }}; } } } 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