diff --git a/README.md b/README.md index 916fecff8..0b463a2db 100644 --- a/README.md +++ b/README.md @@ -369,7 +369,7 @@ export DAPR_HELM_REPO_PASSWORD="passwd_xxx" Setting the above parameters will allow `dapr init -k` to install Dapr images from the configured Helm repository. -A local Helm repo is also supported: +A local Helm repo is also supported, this can either be a directory path or an existing .tgz file. export DAPR_HELM_REPO_URL="/home/user/dapr/helm-charts" diff --git a/pkg/kubernetes/kubernetes.go b/pkg/kubernetes/kubernetes.go index f9f4c22ca..df1079648 100644 --- a/pkg/kubernetes/kubernetes.go +++ b/pkg/kubernetes/kubernetes.go @@ -210,7 +210,7 @@ func locateChartFile(dirPath string) (string, error) { } func pullHelmChart(version, releaseName, helmRepo string, config *helm.Configuration) (string, func(), error) { - // is helmRepo already a directory path? (ie. /home/user/dapr/helm-charts) + // is helmRepo already a directory path or a .tgz file? (ie. /home/user/dapr/helm-charts). if localPath, err := utils.DiscoverHelmPath(helmRepo, releaseName, version); err == nil { return localPath, func() {}, nil } diff --git a/utils/utils.go b/utils/utils.go index d9c76e9ce..eecc55bb8 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -435,13 +435,13 @@ func GetJobObjectNameFromPID(pid string) string { } func DiscoverHelmPath(helmPath, release, version string) (string, error) { - // first try for a local directory path + // first try for a local directory path. dirPath := filepath.Join(helmPath, fmt.Sprintf("%s-%s", release, version)) if ValidatePath(dirPath) == nil { return dirPath, nil } - // not a dir, try a .tgz file instead + // not a dir, try a .tgz file instead. filePath := filepath.Join(helmPath, fmt.Sprintf("%s-%s.tgz", release, version)) if ValidatePath(filePath) == nil { return filePath, nil