Skip to main content
Version: 6.x (Latest)

Deploy Remote Charts

Just like Helm itself, DevSpace supports the deployment of Helm charts that need to be downloaded from a remote location.

Artifact Hub

If you are looking for Helm charts for standard off-the-shelf software components such as databases, message queues, etc., you may want to search for prepackaged Helm charts on Artifact Hub rather than creating and maintaining your own charts for everything.

To deploy Helm charts from Artifact Hub, follow the instructions for Charts from Helm Repositories.

Remote Charts vs Dependencies

If you have several other microservices that are required to work on the current project, you may want to consider if these microservices already have a devspace.yaml or should ideally have one at some point. DevSpace provides a feature called dependencies which allows you to define relationships between devspace.yaml files to allow users to start working on a service while DevSpace stands up and maintains dependent microservices if needed.

Everything that belongs to the current project itself and is not directly developed by you (e.g. a mysql database, a redis cache, etc.) should be defined as a deployment in this project. However, any other related microservices that you own and develop separately should rather be defined a dependencies instead of as remote chart deployments.

Source

From Helm Repository

To deploy a Helm chart from a Helm repository, specify at least name and repo for the respective Helm deployment in devspace.yaml.

devspace.yaml
version: v2beta1
deployments:
database:
helm:
chart:
name: mysql
repo: https://charts.bitnami.com/bitnami
version: 9.0.0
values:
...

Config Reference For Helm Repository Charts

Source: Helm Repository
name required string

Name is the name of the helm chart to deploy. Can also be a local path or an oci url

version required string

Version is the version of the helm chart to deploy

repo required string

RepoURL is the url of the repo to deploy the chart from

username required string

Username is the username to authenticate to the chart repo. When using an OCI chart, used for registry auth

password required string

Password is the password to authenticate to the chart repo, When using an OCI chart, used for registry auth

Authentication For Helm Repositories

If you need to authenticate with the Helm repository, you can provide the username and password fields:

devspace.yaml
version: v2beta1
deployments:
database:
helm:
chart:
name: mysql
repo: https://charts.bitnami.com/bitnami
version: 9.0.0
username: john
password: ${HELM_REPO_PASSWORD}
values:
...
Local Repo Names

When deploying charts, make sure to specify the full URL to the Helm chart repository that contains the respective chart. Do not use the local shortcut name for your repository.

If, for example, you would locally run this Helm install command:

helm install database bitnami/mysql --version 9.0.0

Transferring this to DevSpace could look like this:

devspace.yaml
version: v2beta1
deployments:
database:
helm:
chart:
name: bitnami/mysql # DO NOT USE THIS / This line is problematic!
version: 9.0.0
values:
...

You can see the bitnami/mysql chart name in this install command. This chart name includes bitnami/ as a prefix which looks on your local machine for the Helm repository you added as bitnami. Unfortunately, this is only available on your local machine and is hard to transfer to other team members.

To make sure your devspace.yaml can be used by anyone, do not specify the bitnami/ prefix and instead specify the full Helm repository URL using the repo field:

devspace.yaml
version: v2beta1
deployments:
database:
helm:
chart:
name: mysql
repo: https://charts.bitnami.com/bitnami
version: 9.0.0
values:
...

From Tar Archive

If your Helm chart has not been pushed to a Helm repository but can be downloaded as a tar archive from a web server, you can tell DevSpace to deploy using the URL of the tar archive.

devspace.yaml
version: v2beta1
deployments:
api:
helm:
chart:
name: https://mycompany.tld/example-api-server.tar.gz
values:
...

From Git Repository

If the chart you want to deploy is not (yet) pushed to a Helm repository or available as a tar archive, you can tell DevSpace to retrieve it from a git repository.

devspace.yaml
version: v2beta1
deployments:
api:
helm:
chart:
git: https://github.com/loft-sh/example-api-server.git
subPath: ./chart/
tag: v1.2.3
values:
...

The following config fields are available to specify git-based Helm deployments:

Source: Git Repository
git required string

Git is the remote repository to download the artifact from. You can either use https projects or ssh projects here, but need to make sure git can pull the project. This option is mutually exclusive with the path option.

subPath required string

SubPath is a path within the git repository where the artifact lies in

branch required string

Branch is the git branch to pull

tag required string

Tag is the tag to pull

revision required string

Revision is the git revision to pull

cloneArgs required string[]

CloneArgs are additional arguments that should be supplied to the git CLI

disableShallow required boolean false

DisableShallow can be used to turn off shallow clones as these are the default used by devspace

disablePull required boolean false

DisablePull will disable pulling every time DevSpace is reevaluating this source