JFrog Artifactory has two types of repositories, Local and Virtual. Local repositories are the ones where you push the charts, but to get a chart you’ll need to use a virtual repository!
If local Helm repo is used, then there can be an issue faced while using Helm Chart for Harness deployment with error message:
Invalid request: Failed to fetch chart "CHART_NAME" from repo "CHART_REPO_NAME". Please check if the chart is present in the repo.
To isolate this issue, following commands can be tried directly from the delegate host where the deployment failed.
- */opt/harness-delegate/client-tools/helm/v3.1.2/helm repo add <random_id> <helm_chart_artifactory_url> --username --password ********
- /opt/harness-delegate/client-tools/helm/v3.1.2/helm pull <random_id>/<chart_name> --untar --version <chart_version>
If a local helm repo is used, for the above helm pull command error seen would be:
[firstname.lastname@example.org ~]$ /opt/harness-delegate/client-tools/helm/v3.1.2/helm pull <random_id>/<chart_name> --untar --version <chart_version>
Error: scheme "local" not supported
This is related with how artifactory manages the helm repositories (local and virtual).
If there is a need to pull charts from artifactory one needs to add the virtual repo and the local won’t work, you can read more about this here: https://www.jfrog.com/confluence/display/RTF/Helm+Chart+Repositories