Config Reference
Every project you want to use with DevSpace needs a devspace.yaml
which defines how to build, deploy, debug and develop this project.
The devspace.yaml
file supports the following fields:
version
required string v2beta1
v1beta11
v1beta10
v1beta9
v1beta8
v1beta7
v1beta6
v1beta5
v1beta4
v1beta3
v1beta2
v1beta1
Version holds the config version. DevSpace will always convert older configs to the current latest
config version, which makes it possible to use the newest DevSpace version also with older config
versions.
version
required string v2beta1v1beta11
v1beta10
v1beta9
v1beta8
v1beta7
v1beta6
v1beta5
v1beta4
v1beta3
v1beta2
v1beta1
name
required string
Name specifies the name of the DevSpace project and uniquely identifies a project.
DevSpace will not allow multiple active projects with the same name in the same Kubernetes namespace.
If not provided, DevSpace will use the name of the current working directory.
name
required string imports
required object[]
Imports merges specified config files into this one. This is very useful to split up your DevSpace configuration
into multiple files and reuse those through git, a remote url or common local path.
imports
required object[] enabled
required boolean true
Enabled specifies if the given import should be enabled
enabled
required boolean true path
required string
Path is the local path where DevSpace can find the artifact.
This option is mutually exclusive with the git option.
path
required string 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.
git
required string subPath
required string
SubPath is a path within the git repository where the artifact lies in
subPath
required string branch
required string
Branch is the git branch to pull
branch
required string tag
required string
Tag is the tag to pull
tag
required string revision
required string
Revision is the git revision to pull
revision
required string cloneArgs
required string[]
CloneArgs are additional arguments that should be supplied to the git CLI
cloneArgs
required string[] disableShallow
required boolean false
DisableShallow can be used to turn off shallow clones as these are the default used
by devspace
disableShallow
required boolean false disablePull
required boolean false
DisablePull will disable pulling every time DevSpace is reevaluating this source
disablePull
required boolean false functions
required <function_name>:string
Functions are POSIX functions that can be used within pipelines. Those functions can also be imported by
imports.
functions
required <function_name>:string pipelines
required <pipeline_name>:object
Pipelines are the work blocks that DevSpace should execute when devspace dev, devspace build, devspace deploy or devspace purge
is called. Pipelines are defined through a special POSIX script that allows you to use special commands
such as create_deployments, start_dev, build_images etc. to signal DevSpace you want to execute
a specific functionality. The pipelines dev, build, deploy and purge are special and will override
the default functionality of the respective command if defined. All other pipelines can be either run
via the devspace run-pipeline command or used within another pipeline through run_pipelines.
pipelines
required <pipeline_name>:object <pipeline_name>
required string dev
deploy
build
purge
.*
Name of the pipeline, will be filled automatically
<pipeline_name>
required string devdeploy
build
purge
.*
run
required string
Run is the actual shell command that should be executed during this pipeline
run
required string flags
required object[]
Flags are extra flags that can be used for running the pipeline via
devspace run-pipeline.
flags
required object[] name
required string
Name is the name of the flag
name
required string short
required string
Short is optional and is the shorthand name for this flag. E.g. 'g' converts to '-g'
short
required string type
required string bool bool
int
string
stringArray
Type is the type of the flag. Defaults to bool
type
required string bool boolint
string
stringArray
bool
default
required
Default is the default value for this flag
default
required description
required string
Description is the description as shown in devspace run-pipeline my-pipe -h
description
required string devspace run-pipeline my-pipe -h
continueOnError
required boolean false
ContinueOnError will not fail the whole job and pipeline if
a call within the step fails.
continueOnError
required boolean false images
required <image_name>:object
Images holds configuration of how DevSpace should build images. By default, DevSpace will build all defined images.
If you are using a custom pipeline, you can dynamically define which image is built at which time during the
execution.
images
required <image_name>:object <image_name>
required string
Name of the image, will be filled automatically
<image_name>
required string image
required string
Image is the complete image name including registry and repository
for example myregistry.com/mynamespace/myimage
image
required string tags
required string[]
Tags is an array that specifies all tags that should be build during
the build process. If this is empty, devspace will generate a random tag
tags
required string[] dockerfile
required string ./Dockerfile
Dockerfile specifies a path (relative or absolute) to the dockerfile. Defaults to ./Dockerfile.
dockerfile
required string ./Dockerfile context
required string ./
Context is the context path to build with. Defaults to the current working directory
context
required string ./ buildArgs
required <buildArg_name>:string
BuildArgs are the build args that are to the build
buildArgs
required <buildArg_name>:string target
required string
Target is the target that should get used during the build. Only works if the dockerfile supports this
target
required string network
required string
Network is the network that should get used to build the image
network
required string rebuildStrategy
required string default default
always
ignoreContextChanges
RebuildStrategy is used to determine when DevSpace should rebuild an image. By default, devspace will
rebuild an image if one of the following conditions is true:
- The dockerfile has changed
- The configuration within the devspace.yaml for the image has changed
- A file within the docker context (excluding .dockerignore rules) has changed
This option is ignored for custom builds.
rebuildStrategy
required string default defaultalways
ignoreContextChanges
entrypoint
required string[]
Entrypoint specifies an entrypoint that will be appended to the dockerfile during
image build in memory. Example: ["sleep", "99999"]
entrypoint
required string[] cmd
required string[]
Cmd specifies the arguments for the entrypoint that will be appended
during build in memory to the dockerfile
cmd
required string[] appendDockerfileInstructions
required string[]
AppendDockerfileInstructions are instructions that will be appended to the Dockerfile that is build
at the current build target and are appended before the entrypoint and cmd instructions
appendDockerfileInstructions
required string[] skipPush
required boolean false
SkipPush will not push the image to a registry if enabled. Only works if docker or buildkit is chosen
as build method
skipPush
required boolean false createPullSecret
required boolean true
CreatePullSecret specifies if a pull secret should be created for this image in the
target namespace. Defaults to true
createPullSecret
required boolean true buildKit
required
BuildKit if buildKit is specified, DevSpace will build the image either in-cluster or locally with BuildKit
buildKit
required inCluster
required
InCluster if specified, DevSpace will use BuildKit to build the image within the cluster
inCluster
required name
required string
Name is the name of the builder to use. If omitted, DevSpace will try to create
or reuse a builder in the form devspace-$NAMESPACE
name
required string namespace
required string
Namespace where to create the builder deployment in. Defaults to the current
active namespace.
namespace
required string rootless
required boolean false
Rootless if enabled will create a rootless builder deployment.
rootless
required boolean false image
required string
Image is the docker image to use for the BuildKit deployment
image
required string nodeSelector
required string
NodeSelector is the node selector to use for the BuildKit deployment
nodeSelector
required string noCreate
required boolean false
NoCreate. By default, DevSpace will try to create a new builder if it cannot be found.
If this is true, DevSpace will fail if the specified builder cannot be found.
noCreate
required boolean false noRecreate
required boolean false
NoRecreate. By default, DevSpace will try to recreate the builder if the builder configuration
in the devspace.yaml differs from the actual builder configuration. If this is
true, DevSpace will not try to do that.
noRecreate
required boolean false noLoad
required boolean false
NoLoad if enabled, DevSpace will not try to load the built image into the local docker
daemon if skip push is defined
noLoad
required boolean false createArgs
required string[]
CreateArgs are additional args to create the builder with.
createArgs
required string[] preferMinikube
required boolean false
PreferMinikube if false, will not try to use the minikube docker daemon to build the image
preferMinikube
required boolean false args
required string[]
Args are additional arguments to call docker buildx build with
args
required string[] command
required string[]
Command to override the base command to create a builder and build images. Defaults to ["docker", "buildx"]
command
required string[] docker
required
Docker if docker is specified, DevSpace will build the image using the local docker daemon
docker
required disableFallback
required boolean false
DisableFallback allows you to turn off kaniko building if docker isn't installed
disableFallback
required boolean false preferMinikube
required boolean false
PreferMinikube allows you to turn off using the minikube docker daemon if the minikube
context is used.
preferMinikube
required boolean false useCli
required boolean false
UseCLI specifies if DevSpace should use the docker cli for building
useCli
required boolean false args
required string[]
Args are additional arguments to pass to the docker cli
args
required string[] kaniko
required
Kaniko if kaniko is specified, DevSpace will build the image in-cluster with kaniko
kaniko
required cache
required boolean false
Cache tells DevSpace if a cache repository should be used. defaults to false
cache
required boolean false snapshotMode
required string
SnapshotMode tells DevSpace which snapshot mode kaniko should use. defaults to time
snapshotMode
required string image
required string
Image is the image name of the kaniko pod to use
image
required string initImage
required string
InitImage to override the init image of the kaniko pod
initImage
required string args
required string[]
Args for additional arguments that should be passed to kaniko
args
required string[] command
required string[]
Command to replace the starting command for the kaniko container
command
required string[] namespace
required string
Namespace is the namespace where the kaniko pod should be run
namespace
required string insecure
required boolean false
Insecure allows pushing to insecure registries
insecure
required boolean false pullSecret
required string
PullSecret is the pull secret to mount by default
pullSecret
required string skipPullSecretMount
required boolean false
SkipPullSecretMount will skip mounting the pull secret
skipPullSecretMount
required boolean false nodeSelector
required <nodeSelector_name>:string
NodeSelector is the node selector to use for the kaniko pod
nodeSelector
required <nodeSelector_name>:string tolerations
required object[]
Tolerations is a tolerations list to use for the kaniko pod
tolerations
required object[] serviceAccount
required string
ServiceAccount the service account to use for the kaniko pod
serviceAccount
required string generateName
required string
GenerateName is the optional prefix that will be set to the generateName field of the build pod
generateName
required string annotations
required <annotation_name>:string
Annotations are extra annotations that will be added to the build pod
annotations
required <annotation_name>:string labels
required <label_name>:string
Labels are extra labels that will be added to the build pod
labels
required <label_name>:string initEnv
required <initEnv_name>:string
InitEnv are extra environment variables that will be added to the build init container
initEnv
required <initEnv_name>:string env
required <env_name>:string
Env are extra environment variables that will be added to the build kaniko container
Will populate the env.value field.
env
required <env_name>:string envFrom
required <envFrom_name>:object
EnvFrom are extra environment variables from configmap or secret that will be added to the build kaniko container
Will populate the env.valueFrom field.
envFrom
required <envFrom_name>:object additionalMounts
required object[]
AdditionalMounts are additional mounts that will be added to the build pod
additionalMounts
required object[] secret
required
The secret that should be mounted
secret
required name
required string
Name of the secret in the pod's namespace to use.
More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+optional
name
required string items
required object[]
If unspecified, each key-value pair in the Data field of the referenced
Secret will be projected into the volume as a file whose name is the
key and content is the value. If specified, the listed keys will be
projected into the specified paths, and unlisted keys will not be
present. If a key is specified which is not present in the Secret,
the volume setup will error unless it is marked optional. Paths must be
relative and may not contain the '..' path or start with '..'.
+optional
items
required object[] ####### key
required string {#images-kaniko-additionalMounts-secret-items-key}
The key to project.
key
required string {#images-kaniko-additionalMounts-secret-items-key}####### path
required string {#images-kaniko-additionalMounts-secret-items-path}
The relative path of the file to map the key to.
May not be an absolute path.
May not contain the path element '..'.
May not start with the string '..'.
path
required string {#images-kaniko-additionalMounts-secret-items-path}####### mode
required integer {#images-kaniko-additionalMounts-secret-items-mode}
Optional: mode bits to use on this file, must be a value between 0
and 0777. If not specified, the volume defaultMode will be used.
This might be in conflict with other options that affect the file
mode, like fsGroup, and the result can be other mode bits set.
+optional
mode
required integer {#images-kaniko-additionalMounts-secret-items-mode}defaultMode
required integer
Optional: mode bits to use on created files by default. Must be a
value between 0 and 0777. Defaults to 0644.
Directories within the path are not affected by this setting.
This might be in conflict with other options that affect the file
mode, like fsGroup, and the result can be other mode bits set.
+optional
defaultMode
required integer configMap
required
The configMap that should be mounted
configMap
required name
required string
Name of the configmap
+optional
name
required string items
required object[]
If unspecified, each key-value pair in the Data field of the referenced
ConfigMap will be projected into the volume as a file whose name is the
key and content is the value. If specified, the listed keys will be
projected into the specified paths, and unlisted keys will not be
present. If a key is specified which is not present in the ConfigMap,
the volume setup will error unless it is marked optional. Paths must be
relative and may not contain the '..' path or start with '..'.
+optional
items
required object[] ####### key
required string {#images-kaniko-additionalMounts-configMap-items-key}
The key to project.
key
required string {#images-kaniko-additionalMounts-configMap-items-key}####### path
required string {#images-kaniko-additionalMounts-configMap-items-path}
The relative path of the file to map the key to.
May not be an absolute path.
May not contain the path element '..'.
May not start with the string '..'.
path
required string {#images-kaniko-additionalMounts-configMap-items-path}####### mode
required integer {#images-kaniko-additionalMounts-configMap-items-mode}
Optional: mode bits to use on this file, must be a value between 0
and 0777. If not specified, the volume defaultMode will be used.
This might be in conflict with other options that affect the file
mode, like fsGroup, and the result can be other mode bits set.
+optional
mode
required integer {#images-kaniko-additionalMounts-configMap-items-mode}defaultMode
required integer
Optional: mode bits to use on created files by default. Must be a
value between 0 and 0777. Defaults to 0644.
Directories within the path are not affected by this setting.
This might be in conflict with other options that affect the file
mode, like fsGroup, and the result can be other mode bits set.
+optional
defaultMode
required integer readOnly
required boolean false
Mounted read-only if true, read-write otherwise (false or unspecified).
Defaults to false.
+optional
readOnly
required boolean false mountPath
required string
Path within the container at which the volume should be mounted. Must
not contain ':'.
mountPath
required string subPath
required string
Path within the volume from which the container's volume should be mounted.
Defaults to "" (volume's root).
+optional
subPath
required string custom
required
Custom if custom is specified, DevSpace will build the image with the help of
a custom script.
custom
required deployments
required <deployment_name>:object
Deployments holds configuration of how DevSpace should deploy resources to Kubernetes. By default, DevSpace will deploy all defined deployments.
If you are using a custom pipeline, you can dynamically define which deployment is deployed at which time during the
execution.
deployments
required <deployment_name>:object <deployment_name>
required string
Name of the deployment
<deployment_name>
required string helm
required
Helm tells DevSpace to deploy this deployment via helm
helm
required releaseName
required string
ReleaseName of the helm configuration
releaseName
required string chart
required
Chart holds the chart configuration and where DevSpace can find the chart
chart
required name
required string
Name is the name of the helm chart to deploy. Can also be a local path or an oci url
name
required string version
required string
Version is the version of the helm chart to deploy
version
required string repo
required string
RepoURL is the url of the repo to deploy the chart from
repo
required string username
required string
Username is the username to authenticate to the chart repo. When using an OCI chart, used for registry auth
username
required string password
required string
Password is the password to authenticate to the chart repo, When using an OCI chart, used for registry auth
password
required string path
required string
Path is the local path where DevSpace can find the artifact.
This option is mutually exclusive with the git option.
path
required string 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.
git
required string subPath
required string
SubPath is a path within the git repository where the artifact lies in
subPath
required string branch
required string
Branch is the git branch to pull
branch
required string tag
required string
Tag is the tag to pull
tag
required string revision
required string
Revision is the git revision to pull
revision
required string cloneArgs
required string[]
CloneArgs are additional arguments that should be supplied to the git CLI
cloneArgs
required string[] disableShallow
required boolean false
DisableShallow can be used to turn off shallow clones as these are the default used
by devspace
disableShallow
required boolean false disablePull
required boolean false
DisablePull will disable pulling every time DevSpace is reevaluating this source
disablePull
required boolean false values
required object
Values are additional values that should get passed to deploying this chart
values
required object valuesFiles
required string[]
ValuesFiles are additional files that hold values for deploying this chart
valuesFiles
required string[] displayOutput
required boolean false
DisplayOutput allows you to display the helm output to the console
displayOutput
required boolean false upgradeArgs
required string[]
UpgradeArgs are additional arguments to pass to helm upgrade
upgradeArgs
required string[] helm upgrade
templateArgs
required string[]
TemplateArgs are additional arguments to pass to helm template
templateArgs
required string[] helm template
disableDependencyUpdate
required boolean false
DisableDependencyUpdate disables helm dependencies update, default to false
disableDependencyUpdate
required boolean false kubectl
required
Kubectl tells DevSpace to deploy this deployment via kubectl or kustomize
kubectl
required manifests
required string[]
Manifests is a list of files or folders that will be deployed by DevSpace using kubectl
or kustomize
manifests
required string[] applyArgs
required string[]
ApplyArgs are extra arguments for kubectl apply
applyArgs
required string[] kubectl apply
createArgs
required string[]
CreateArgs are extra arguments for kubectl create
which will be run before kubectl apply
createArgs
required string[] kubectl create
which will be run before kubectl apply
kubectlBinaryPath
required string
KubectlBinaryPath is the optional path where to find the kubectl binary
kubectlBinaryPath
required string inlineManifest
required string
InlineManifests is a block containing the manifest to deploy
inlineManifest
required string kustomize
required boolean false
Kustomize can be used to enable kustomize instead of kubectl
kustomize
required boolean false kustomizeArgs
required string[]
KustomizeArgs are extra arguments for kustomize build
which will be run before kubectl apply
kustomizeArgs
required string[] kustomize build
which will be run before kubectl apply
kustomizeBinaryPath
required string
KustomizeBinaryPath is the optional path where to find the kustomize binary
kustomizeBinaryPath
required string patches
required object[]
Patches are additional changes to the pod spec that should be applied
patches
required object[] updateImageTags
required boolean true
UpdateImageTags lets you define if DevSpace should update the tags of the images defined in the
images section with their most recent built tag.
updateImageTags
required boolean true namespace
required string
Namespace where to deploy this deployment
namespace
required string dev
required <dev_name>:object
Dev holds development configuration. Each dev configuration targets a single pod and enables certain dev services on that pod
or even rewrites it if certain changes are requested, such as adding an environment variable or changing the entrypoint.
Dev allows you to:
- sync local folders to the Kubernetes pod
- port forward remote ports to your local computer
- forward local ports into the Kubernetes pod
- configure an ssh tunnel to the Kubernetes pod
- proxy local commands to the container
- restart the container on file changes
dev
required <dev_name>:object <dev_name>
required string
Name of the dev configuration
<dev_name>
required string imageSelector
required string
ImageSelector to select a pod
imageSelector
required string labelSelector
required <labelSelector_name>:string
LabelSelector to select a pod
labelSelector
required <labelSelector_name>:string namespace
required string
Namespace where to select the pod
namespace
required string container
required string
Container is the container name these services should get started.
container
required string arch
required string
Target Container architecture to use for the devspacehelper (currently amd64 or arm64). Defaults to amd64, but
devspace tries to find out the architecture by itself by looking at the node this container runs on.
arch
required string containers
required <container_name>:object
containers
required <container_name>:object container
required string
Container is the container name these services should get started.
container
required string arch
required string
Target Container architecture to use for the devspacehelper (currently amd64 or arm64). Defaults to amd64, but
devspace tries to find out the architecture by itself by looking at the node this container runs on.
arch
required string devImage
required string
DevImage is the image to use for this container and will replace the existing image
if necessary.
devImage
required string command
required string[]
Command can be used to override the entrypoint of the container
command
required string[] args
required string[]
Args can be used to override the args of the container
args
required string[] workingDir
required string
WorkingDir can be used to override the working dir of the container
workingDir
required string env
required object[]
Env can be used to add environment variables to the container. DevSpace will
not replace existing environment variables if an environment variable is defined here.
env
required object[] reversePorts
required object[]
ReversePorts are port mappings to make local ports available inside the container
reversePorts
required object[] port
required string
Port is a port mapping that maps the localPort:remotePort. So if
you port forward the remote port will be available at the local port.
If you do reverse port forwarding, the local port will be available
at the remote port in the container. If only port is specified, local and
remote port are the same.
port
required string bindAddress
required string
BindAddress is the address DevSpace should listen on. Optional and defaults
to localhost.
bindAddress
required string sync
required object[]
Sync allows you to sync certain local paths with paths inside the container
sync
required object[] path
required string
Path is the path to sync. This can be defined in the form localPath:remotePath. You can also use '.'
to specify either the local or remote working directory. This is valid for example: .:.
path
required string excludePaths
required string[]
ExcludePaths is an array of file patterns in gitignore format to exclude.
excludePaths
required string[] excludeFile
required string
ExcludeFile loads the file patterns to exclude from a file.
excludeFile
required string downloadExcludePaths
required string[]
DownloadExcludePaths is an array of file patterns in gitignore format to exclude from downloading
downloadExcludePaths
required string[] downloadExcludeFile
required string
DownloadExcludeFile loads the file patterns to exclude from downloading from a file.
downloadExcludeFile
required string uploadExcludePaths
required string[]
UploadExcludePaths is an array of file patterns in gitignore format to exclude from uploading
uploadExcludePaths
required string[] uploadExcludeFile
required string
UploadExcludeFile loads the file patterns to exclude from uploading from a file.
uploadExcludeFile
required string startContainer
required boolean false
StartContainer will start the container after initial sync is done. This will
inject a devspacehelper into the pod and you need to define dev.*.command for
this to work.
startContainer
required boolean false onUpload
required
OnUpload can be used to execute certain commands on uploading either in the container or locally as
well as restart the container after a file changed has happened.
onUpload
required restartContainer
required boolean false
If true restart container will try to restart the container after a change has been made. Make sure that
images.*.injectRestartHelper is enabled for the container that should be restarted or the devspace-restart-helper
script is present in the container root folder.
restartContainer
required boolean false exec
required object[]
Exec will execute the given commands in order after a sync operation
exec
required object[] ####### name
required string {#dev-containers-sync-onUpload-exec-name}
Name is the name to show for this exec in the logs
name
required string {#dev-containers-sync-onUpload-exec-name}####### command
required string {#dev-containers-sync-onUpload-exec-command}
Command is the command to execute. If no args are specified this is executed
within a shell.
command
required string {#dev-containers-sync-onUpload-exec-command}####### args
required string[] {#dev-containers-sync-onUpload-exec-args}
Args are arguments to pass to the command
args
required string[] {#dev-containers-sync-onUpload-exec-args}####### failOnError
required boolean false {#dev-containers-sync-onUpload-exec-failOnError}
FailOnError specifies if the sync should fail if the command fails
failOnError
required boolean false {#dev-containers-sync-onUpload-exec-failOnError}####### local
required boolean false {#dev-containers-sync-onUpload-exec-local}
Local specifies if the command should be executed locally instead of within the
container
local
required boolean false {#dev-containers-sync-onUpload-exec-local}####### once
required boolean false {#dev-containers-sync-onUpload-exec-once}
Once executes this command only once in the container's life. Can be used to initialize
a container before starting it, but after everything was synced.
once
required boolean false {#dev-containers-sync-onUpload-exec-once}####### onChange
required string[] {#dev-containers-sync-onUpload-exec-onChange}
OnChange is an array of file patterns that trigger this command execution
onChange
required string[] {#dev-containers-sync-onUpload-exec-onChange}initialSync
required string
InitialSync defines the initial sync strategy to use when this sync starts. Defaults to mirrorLocal
You can completely disable this using the initialSync: disabled
option.
initialSync
required string initialSync: disabled
option.waitInitialSync
required boolean false
WaitInitialSync can be used to tell DevSpace to not wait until the initial sync is done
waitInitialSync
required boolean false initialSyncCompareBy
required string
InitialSyncCompareBy defines if the sync should only compare by the given type. Either mtime or size are possible
initialSyncCompareBy
required string disableDownload
required boolean false
DisableDownload will disable downloading completely
disableDownload
required boolean false disableUpload
required boolean false
DisableUpload will disable uploading completely
disableUpload
required boolean false bandwidthLimits
required
BandwidthLimits can be used to limit the amount of bytes that are transferred by DevSpace with this
sync configuration
bandwidthLimits
required polling
required boolean false
Polling will tell the remote container to use polling instead of inotify
polling
required boolean false noWatch
required boolean false
NoWatch will terminate the sync after the initial sync is done
noWatch
required boolean false file
required boolean false
File signals DevSpace that this is a single file that should get synced instead of a whole directory
file
required boolean false persistPaths
required object[]
PersistPaths allows you to persist certain paths within this container with a persistent volume claim
persistPaths
required object[] path
required string
Path is the container path that should get persisted. By default, DevSpace will create an init container
that will copy over the contents of this folder from the existing image.
path
required string volumePath
required string
VolumePath is the sub path on the volume that is mounted as persistent volume for this path
volumePath
required string readOnly
required boolean false
ReadOnly will make the persistent path read only to the user
readOnly
required boolean false skipPopulate
required boolean false
SkipPopulate will not create an init container to copy over the existing contents if true
skipPopulate
required boolean false initContainer
required
InitContainer holds additional options for the persistent path init container
initContainer
required resources
required
Resources are the resources used by the persistent path init container
resources
required ####### requests
required <request_name>:string {#dev-containers-persistPaths-initContainer-resources-requests}
Requests are the requests part of the resources
requests
required <request_name>:string {#dev-containers-persistPaths-initContainer-resources-requests}####### limits
required <limit_name>:string {#dev-containers-persistPaths-initContainer-resources-limits}
Limits are the limits part of the resources
limits
required <limit_name>:string {#dev-containers-persistPaths-initContainer-resources-limits}terminal
required
Terminal allows you to tell DevSpace to open a terminal with screen support to this container
terminal
required command
required string
Command is the command that should be executed on terminal start.
This command is executed within a shell.
command
required string workDir
required string
WorkDir is the working directory that is used to execute the command in.
workDir
required string enabled
required boolean false
If enabled is true, DevSpace will use the terminal. Can be also
used to disable the terminal if set to false. DevSpace makes sure
that within a pipeline only one dev configuration can open a terminal
at a time and subsequent dev terminals will fail.
enabled
required boolean false disableReplace
required boolean false
DisableReplace tells DevSpace to not replace the pod or adjust its settings
to make sure the pod is sleeping when opening a terminal
disableReplace
required boolean false disableScreen
required boolean false
DisableScreen will disable screen which is used by DevSpace by default to preserve
sessions if connections interrupt or the session is lost.
disableScreen
required boolean false disableTTY
required boolean false
DisableTTY will disable a tty shell for terminal command execution
disableTTY
required boolean false logs
required
Logs allows you to tell DevSpace to stream logs from this container to the console
logs
required attach
required
Attach allows you to tell DevSpace to attach to this container
attach
required enabled
required boolean false
Enabled can be used to enable attaching to a container
enabled
required boolean false disableReplace
required boolean false
DisableReplace prevents DevSpace from actually replacing the pod with modifications so that
the pod starts up correctly.
disableReplace
required boolean false disableTTY
required boolean false
DisableTTY is used to tell DevSpace to not use a TTY connection for attaching
disableTTY
required boolean false ssh
required
SSH allows you to create an SSH tunnel to this container
ssh
required enabled
required boolean false
Enabled can be used to enable the ssh server within the container. By default,
DevSpace will generate the required keys and create an entry in your ~/.ssh/config
for this container that can be used via ssh dev-config-name.dev-project-name.devspace
enabled
required boolean false ssh dev-config-name.dev-project-name.devspace
localHostname
required string
LocalHostname is the local ssh host to write to the ~/.ssh/config
localHostname
required string localPort
required integer
LocalPort is the local port to forward from, if empty will be random
localPort
required integer remoteAddress
required string
RemoteAddress is the address to listen to inside the container
remoteAddress
required string useInclude
required boolean false
UseInclude tells DevSpace to use a the file ~/.ssh/devspace_config for its ssh entries. DevSpace
will also create an import for its own entries inside ~/.ssh/config, this is a cleaner way,
but unfortunately not all SSH clients support this.
useInclude
required boolean false proxyCommands
required object[]
ProxyCommands allow you to proxy certain local commands to the container
proxyCommands
required object[] gitCredentials
required boolean false
GitCredentials configures a git credentials helper inside the container that proxies local git credentials
gitCredentials
required boolean false command
required string
Command is the name of the command that should be available in the remote container. DevSpace
will create a small script for that inside the container that redirect command execution to
the local computer.
command
required string localCommand
required string
LocalCommand can be used to run a different command than specified via the command option. By
default, this will be assumed to be the same as command.
localCommand
required string skipContainerEnv
required boolean false
SkipContainerEnv will not forward the container environment variables to the local command
skipContainerEnv
required boolean false env
required <env_name>:string
Env are extra environment variables to set for the command
env
required <env_name>:string restartHelper
required
RestartHelper holds restart helper specific configuration. The restart helper is used to delay starting of
the container and restarting it and is injected via an annotation in the replaced pod.
restartHelper
required devImage
required string
DevImage is the image to use for this container and will replace the existing image
if necessary.
devImage
required string command
required string[]
Command can be used to override the entrypoint of the container
command
required string[] args
required string[]
Args can be used to override the args of the container
args
required string[] workingDir
required string
WorkingDir can be used to override the working dir of the container
workingDir
required string env
required object[]
Env can be used to add environment variables to the container. DevSpace will
not replace existing environment variables if an environment variable is defined here.
env
required object[] resources
required
Resources can be used to override the resource definitions of the container
resources
required persistenceOptions
required
PersistenceOptions are additional options for persisting paths within this pod
persistenceOptions
required size
required string
Size is the size of the created persistent volume in Kubernetes size notation like 5Gi
size
required string storageClassName
required string
StorageClassName is the storage type DevSpace should use for this persistent volume
storageClassName
required string accessModes
required string[]
AccessModes are the access modes DevSpace should use for the persistent volume
accessModes
required string[] readOnly
required boolean false
ReadOnly specifies if the volume should be read only
readOnly
required boolean false name
required string
Name is the name of the PVC that should be created. If a PVC with that name
already exists, DevSpace will use that PVC instead of creating one.
name
required string patches
required object[]
Patches are additional changes to the pod spec that should be applied
patches
required object[] reversePorts
required object[]
ReversePorts are port mappings to make local ports available inside the container
reversePorts
required object[] port
required string
Port is a port mapping that maps the localPort:remotePort. So if
you port forward the remote port will be available at the local port.
If you do reverse port forwarding, the local port will be available
at the remote port in the container. If only port is specified, local and
remote port are the same.
port
required string bindAddress
required string
BindAddress is the address DevSpace should listen on. Optional and defaults
to localhost.
bindAddress
required string ports
required object[]
Ports defines port mappings from the remote pod that should be forwarded to your local
computer
ports
required object[] port
required string
Port is a port mapping that maps the localPort:remotePort. So if
you port forward the remote port will be available at the local port.
If you do reverse port forwarding, the local port will be available
at the remote port in the container. If only port is specified, local and
remote port are the same.
port
required string bindAddress
required string
BindAddress is the address DevSpace should listen on. Optional and defaults
to localhost.
bindAddress
required string sync
required object[]
Sync allows you to sync certain local paths with paths inside the container
sync
required object[] path
required string
Path is the path to sync. This can be defined in the form localPath:remotePath. You can also use '.'
to specify either the local or remote working directory. This is valid for example: .:.
path
required string excludePaths
required string[]
ExcludePaths is an array of file patterns in gitignore format to exclude.
excludePaths
required string[] excludeFile
required string
ExcludeFile loads the file patterns to exclude from a file.
excludeFile
required string downloadExcludePaths
required string[]
DownloadExcludePaths is an array of file patterns in gitignore format to exclude from downloading
downloadExcludePaths
required string[] downloadExcludeFile
required string
DownloadExcludeFile loads the file patterns to exclude from downloading from a file.
downloadExcludeFile
required string uploadExcludePaths
required string[]
UploadExcludePaths is an array of file patterns in gitignore format to exclude from uploading
uploadExcludePaths
required string[] uploadExcludeFile
required string
UploadExcludeFile loads the file patterns to exclude from uploading from a file.
uploadExcludeFile
required string startContainer
required boolean false
StartContainer will start the container after initial sync is done. This will
inject a devspacehelper into the pod and you need to define dev.*.command for
this to work.
startContainer
required boolean false onUpload
required
OnUpload can be used to execute certain commands on uploading either in the container or locally as
well as restart the container after a file changed has happened.
onUpload
required restartContainer
required boolean false
If true restart container will try to restart the container after a change has been made. Make sure that
images.*.injectRestartHelper is enabled for the container that should be restarted or the devspace-restart-helper
script is present in the container root folder.
restartContainer
required boolean false exec
required object[]
Exec will execute the given commands in order after a sync operation
exec
required object[] name
required string
Name is the name to show for this exec in the logs
name
required string command
required string
Command is the command to execute. If no args are specified this is executed
within a shell.
command
required string args
required string[]
Args are arguments to pass to the command
args
required string[] failOnError
required boolean false
FailOnError specifies if the sync should fail if the command fails
failOnError
required boolean false local
required boolean false
Local specifies if the command should be executed locally instead of within the
container
local
required boolean false once
required boolean false
Once executes this command only once in the container's life. Can be used to initialize
a container before starting it, but after everything was synced.
once
required boolean false onChange
required string[]
OnChange is an array of file patterns that trigger this command execution
onChange
required string[] initialSync
required string
InitialSync defines the initial sync strategy to use when this sync starts. Defaults to mirrorLocal
initialSync
required string waitInitialSync
required boolean false
WaitInitialSync can be used to tell DevSpace to not wait until the initial sync is done
waitInitialSync
required boolean false initialSyncCompareBy
required string
InitialSyncCompareBy defines if the sync should only compare by the given type. Either mtime or size are possible
initialSyncCompareBy
required string disableDownload
required boolean false
DisableDownload will disable downloading completely
disableDownload
required boolean false disableUpload
required boolean false
DisableUpload will disable uploading completely
disableUpload
required boolean false bandwidthLimits
required
BandwidthLimits can be used to limit the amount of bytes that are transferred by DevSpace with this
sync configuration
bandwidthLimits
required polling
required boolean false
Polling will tell the remote container to use polling instead of inotify
polling
required boolean false noWatch
required boolean false
NoWatch will terminate the sync after the initial sync is done
noWatch
required boolean false file
required boolean false
File signals DevSpace that this is a single file that should get synced instead of a whole directory
file
required boolean false persistPaths
required object[]
PersistPaths allows you to persist certain paths within this container with a persistent volume claim
persistPaths
required object[] path
required string
Path is the container path that should get persisted. By default, DevSpace will create an init container
that will copy over the contents of this folder from the existing image.
path
required string volumePath
required string
VolumePath is the sub path on the volume that is mounted as persistent volume for this path
volumePath
required string readOnly
required boolean false
ReadOnly will make the persistent path read only to the user
readOnly
required boolean false skipPopulate
required boolean false
SkipPopulate will not create an init container to copy over the existing contents if true
skipPopulate
required boolean false initContainer
required
InitContainer holds additional options for the persistent path init container
initContainer
required terminal
required
Terminal allows you to tell DevSpace to open a terminal with screen support to this container
terminal
required command
required string
Command is the command that should be executed on terminal start.
This command is executed within a shell.
command
required string workDir
required string
WorkDir is the working directory that is used to execute the command in.
workDir
required string enabled
required boolean false
If enabled is true, DevSpace will use the terminal. Can be also
used to disable the terminal if set to false. DevSpace makes sure
that within a pipeline only one dev configuration can open a terminal
at a time and subsequent dev terminals will fail.
enabled
required boolean false disableReplace
required boolean false
DisableReplace tells DevSpace to not replace the pod or adjust its settings
to make sure the pod is sleeping when opening a terminal
disableReplace
required boolean false disableScreen
required boolean false
DisableScreen will disable screen which is used by DevSpace by default to preserve
sessions if connections interrupt or the session is lost.
disableScreen
required boolean false disableTTY
required boolean false
DisableTTY will disable a tty shell for terminal command execution
disableTTY
required boolean false logs
required
Logs allows you to tell DevSpace to stream logs from this container to the console
logs
required attach
required
Attach allows you to tell DevSpace to attach to this container
attach
required enabled
required boolean false
Enabled can be used to enable attaching to a container
enabled
required boolean false disableReplace
required boolean false
DisableReplace prevents DevSpace from actually replacing the pod with modifications so that
the pod starts up correctly.
disableReplace
required boolean false disableTTY
required boolean false
DisableTTY is used to tell DevSpace to not use a TTY connection for attaching
disableTTY
required boolean false ssh
required
SSH allows you to create an SSH tunnel to this container
ssh
required enabled
required boolean false
Enabled can be used to enable the ssh server within the container. By default,
DevSpace will generate the required keys and create an entry in your ~/.ssh/config
for this container that can be used via ssh dev-config-name.dev-project-name.devspace
enabled
required boolean false ssh dev-config-name.dev-project-name.devspace
localHostname
required string
LocalHostname is the local ssh host to write to the ~/.ssh/config
localHostname
required string localPort
required integer
LocalPort is the local port to forward from, if empty will be random
localPort
required integer remoteAddress
required string
RemoteAddress is the address to listen to inside the container
remoteAddress
required string useInclude
required boolean false
UseInclude tells DevSpace to use a the file ~/.ssh/devspace_config for its ssh entries. DevSpace
will also create an import for its own entries inside ~/.ssh/config, this is a cleaner way,
but unfortunately not all SSH clients support this.
useInclude
required boolean false proxyCommands
required object[]
ProxyCommands allow you to proxy certain local commands to the container
proxyCommands
required object[] gitCredentials
required boolean false
GitCredentials configures a git credentials helper inside the container that proxies local git credentials
gitCredentials
required boolean false command
required string
Command is the name of the command that should be available in the remote container. DevSpace
will create a small script for that inside the container that redirect command execution to
the local computer.
command
required string localCommand
required string
LocalCommand can be used to run a different command than specified via the command option. By
default, this will be assumed to be the same as command.
localCommand
required string skipContainerEnv
required boolean false
SkipContainerEnv will not forward the container environment variables to the local command
skipContainerEnv
required boolean false env
required <env_name>:string
Env are extra environment variables to set for the command
env
required <env_name>:string restartHelper
required
RestartHelper holds restart helper specific configuration. The restart helper is used to delay starting of
the container and restarting it and is injected via an annotation in the replaced pod.
restartHelper
required vars
required <var_name>:object
Vars are config variables that can be used inside other config sections to replace certain values dynamically
vars
required <var_name>:object <var_name>
required string
Name is the name of the variable
<var_name>
required string value
required string|integer|boolean
Value is a shortcut for using source: none and default: my-value
value
required string|integer|boolean question
required string
Question can be used to define a custom question if the variable was not yet used
question
required string default
required string|integer|boolean
Default is the default value the variable should have if not set by the user
default
required string|integer|boolean options
required string[]
Options are options that can be selected when the variable question is asked
options
required string[] password
required boolean false
Password signals that this variable should not be visible if entered
password
required boolean false validationPattern
required string
ValidationPattern can be used to verify the user input
validationPattern
required string validationMessage
required string
ValidationMessage can be used to tell the user the format of the variable value
validationMessage
required string noCache
required boolean false
NoCache can be used to prompt the user on every run for this variable
noCache
required boolean false command
required string
Command is the command how to retrieve the variable. If args is omitted, command is parsed as a shell
command.
command
required string args
required string[]
Args are optional args that will be used for the command
args
required string[] commands
required object[]
Commands are additional commands that can be used to run a different command on a different operating
system.
commands
required object[] os
required string
OperatingSystem is optional and defines the operating system this
command should be executed on
os
required string command
required string
Command is the command to use to retrieve the value for this variable. If no
args are specified the command is run within a pseudo shell.
command
required string args
required string[]
Args are optional arguments for the command
args
required string[] alwaysResolve
required boolean false
AlwaysResolve makes sure this variable will always be resolved and not only if it is used somewhere. Defaults to false.
alwaysResolve
required boolean false source
required string all all
env
input
command
none
Source defines where the variable should be taken from
source
required string all allenv
input
command
none
commands
required <command_name>:object
Commands are custom commands that can be executed via 'devspace run COMMAND'. These commands are run within a pseudo bash
that also allows executing special commands such as run_watch or is_equal.
commands
required <command_name>:object <command_name>
required string
Name is the name of a command that is used via devspace run NAME
<command_name>
required string devspace run NAME
section
required string
Section can be used to group similar commands together in devspace list commands
section
required string devspace list commands
command
required string
Command is the command that should be executed. For example: 'echo 123'
command
required string args
required string[]
Args are optional and if defined, command is not executed within a shell
and rather directly.
args
required string[] appendArgs
required boolean false
AppendArgs will append arguments passed to the DevSpace command automatically to
the specified command.
appendArgs
required boolean false description
required string
Description describes what the command is doing and can be seen in devspace list commands
description
required string devspace list commands
internal
required boolean false
Internal commands are not show in list and are usable through run_command
internal
required boolean false after
required string
After is executed after the command was run. It is executed also when
the command was interrupted which will set the env variable COMMAND_INTERRUPT
to true as well as when the command errored which will set the error string to
COMMAND_ERROR.
after
required string dependencies
required <dependency_name>:object
Dependencies are sub devspace projects that lie in a local folder or remote git repository that can be executed
from within the pipeline. In contrast to imports, these projects pose as separate fully functional DevSpace projects
that typically lie including source code in a different folder and can be used to compose a full microservice
application that will be deployed by DevSpace. Each dependency name can only be used once and if you want to use
the same project multiple times, make sure to use a different name for each of those instances.
dependencies
required <dependency_name>:object <dependency_name>
required string
Name is used internally
<dependency_name>
required string disabled
required boolean false
Disabled excludes this dependency from variable resolution and pipeline runs
disabled
required boolean false path
required string
Path is the local path where DevSpace can find the artifact.
This option is mutually exclusive with the git option.
path
required string 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.
git
required string subPath
required string
SubPath is a path within the git repository where the artifact lies in
subPath
required string branch
required string
Branch is the git branch to pull
branch
required string tag
required string
Tag is the tag to pull
tag
required string revision
required string
Revision is the git revision to pull
revision
required string cloneArgs
required string[]
CloneArgs are additional arguments that should be supplied to the git CLI
cloneArgs
required string[] disableShallow
required boolean false
DisableShallow can be used to turn off shallow clones as these are the default used
by devspace
disableShallow
required boolean false disablePull
required boolean false
DisablePull will disable pulling every time DevSpace is reevaluating this source
disablePull
required boolean false pipeline
required string deploy
Pipeline is the pipeline to deploy by default. Defaults to 'deploy'
pipeline
required string deploy vars
required <var_name>:string
Vars are variables that should be passed to the dependency
vars
required <var_name>:string overwriteVars
required boolean false
OverwriteVars specifies if DevSpace should pass the parent variables to the dependency
overwriteVars
required boolean false ignoreDependencies
required boolean false
IgnoreDependencies defines if dependencies of the dependency should be excluded
ignoreDependencies
required boolean false namespace
required string
Namespace specifies the namespace this dependency should be deployed to
namespace
required string pullSecrets
required <pullSecret_name>:object
PullSecrets are image pull secrets that will be created by devspace in the target namespace
during devspace dev or devspace deploy. DevSpace will merge all defined pull secrets into a single
one or the one specified.
pullSecrets
required <pullSecret_name>:object <pullSecret_name>
required string
Name is the pull secret name to deploy
<pullSecret_name>
required string registry
required string
The registry to create the image pull secret for.
Empty string == docker hub
e.g. gcr.io
registry
required string username
required string
The username of the registry. If this is empty, devspace will try
to receive the auth data from the local docker
username
required string password
required string
The password to use for the registry. If this is empty, devspace will
try to receive the auth data from the local docker
password
required string email
required string
The optional email to use
email
required string secret
required string
The secret to create
secret
required string serviceAccounts
required string[]
The service account to add the secret to
serviceAccounts
required string[] require
required
Require defines what DevSpace, plugins and command versions are required to use this config and if a condition is not
fulfilled, DevSpace will fail.
require
required devspace
required string
DevSpace specifies the DevSpace version constraint that is needed to use this config
devspace
required string commands
required object[]
Commands specifies an array of commands that need to be installed locally to use this config
commands
required object[] name
required string
Name is the name of the command that should be installed
name
required string versionArgs
required string[]
VersionArgs are the arguments to retrieve the version of the command
versionArgs
required string[] versionRegEx
required string
VersionRegEx is the regex that is used to parse the version
versionRegEx
required string version
required string
Version constraint of the command that should be installed
version
required string hooks
required object[]
Hooks are actions that are executed at certain points within the pipeline. Hooks are ordered and are executed
in the order they are specified. They are deprecated and pipelines should be used instead.
hooks
required object[] name
required string
Name is the name of the hook
name
required string disabled
required boolean false
Disabled can be used to disable the hook
disabled
required boolean false events
required string[]
Events are the events when the hook should be executed
events
required string[] command
required string
Command is the base command that is either executed locally or in a remote container.
Command is mutually exclusive with other hook actions. In the case this is defined
together with where.container, DevSpace will until the target container is running and
only then execute the command. If the container does not start in time, DevSpace will fail.
command
required string args
required string[]
Args are additional arguments passed together with the command to execute.
args
required string[] os
required string
If an operating system is defined, the hook will only be executed for the given os.
All supported golang OS types are supported and multiple can be combined with ','.
os
required string upload
required
If Upload is specified, DevSpace will upload certain local files or folders into a
remote container.
upload
required download
required
Same as Upload, but with this option DevSpace will download files or folders from
a remote container.
download
required logs
required
If logs is defined will print the logs of the target container. This is useful for containers
that should finish like init containers or job pods. Otherwise this hook will never terminate.
logs
required tailLines
required integer
If set, the number of lines from the end of the logs to show. If not specified,
logs are shown from the creation of the container
tailLines
required integer wait
required
If wait is defined the hook will wait until the matched pod or container is running or is terminated
with a certain exit code.
wait
required running
required boolean false
If running is true, will wait until the matched containers are running. Can be used together with terminatedWithCode.
running
required boolean false terminatedWithCode
required integer
If terminatedWithCode is not nil, will wait until the matched containers are terminated with the given exit code.
If the container has exited with a different exit code, the hook will fail. Can be used together with running.
terminatedWithCode
required integer timeout
required integer
The amount of seconds to wait until the hook will fail. Defaults to 150 seconds.
timeout
required integer background
required boolean false
If true, the hook will be executed in the background.
background
required boolean false silent
required boolean false
If true, the hook will not output anything to the standard out of DevSpace except
for the case when the hook fails, where DevSpace will show the error including
the captured output streams of the hook.
silent
required boolean false container
required
Container specifies where the hook should be run. If this is omitted DevSpace expects a
local command hook.
container
required labelSelector
required <labelSelector_name>:string
LabelSelector to select a container
labelSelector
required <labelSelector_name>:string pod
required string
Pod name to use
pod
required string namespace
required string
Namespace to use
namespace
required string imageSelector
required string
ImageSelector to select a container
imageSelector
required string containerName
required string
ContainerName to use
containerName
required string wait
required boolean false
Wait can be used to disable waiting
wait
required boolean false timeout
required integer 150
Timeout is how long to wait (in seconds) for the container to start. Default is 150 seconds.
timeout
required integer 150 once
required boolean false
Once only executes an hook once in the container until it is restarted
once
required boolean false localRegistry
required
LocalRegistry specifies the configuration for a local image registry
localRegistry
required enabled
required boolean false
Enabled enables the local registry for pushing images.
When unset the local registry will be used as a fallback if there are no push permissions for the registry.
When true
the local registry will always be used.
When false
the local registry will never be used.
enabled
required boolean false true
the local registry will always be used.
When false
the local registry will never be used.localbuild
required boolean false
LocalBuild enables use of local docker builder instead of building in the cluster
localbuild
required boolean false namespace
required string
Namespace where the local registry is deployed. Default is the current context's namespace
namespace
required string name
required string
Name of the deployment and service of the local registry. Default is registry
name
required string registry
image
required string
Image of the local registry. Default is registry:2.8.1
image
required string registry:2.8.1
buildKitImage
required string
BuildKitImage of the buildkit sidecar. Default is moby/buildkit:master-rootless
buildKitImage
required string moby/buildkit:master-rootless
port
required integer
Port that the registry image listens on. Default is 5000
port
required integer 5000
persistence
required
Persistence settings for the local registry
persistence
required enabled
required boolean false
Enable enables persistence for the local registry
enabled
required boolean false size
required string
Size of the persistent volume for local docker registry storage. Default is 5Gi
size
required string 5Gi
storageClassName
required string
StorageClassName of the persistent volume. Default is your cluster's configured default storage class
storageClassName
required string