docker:...# struct | Build image with docker and set options for docker
kaniko:...# struct | Build image with kaniko and set options for kaniko
custom:...# struct | Build image using a custom build script
disabled:false # bool | Disable image building (Default: false)
info
Setting the key docker, kaniko, custom or disabled will define the build tool for this image.
If neither docker, kaniko, custom nor disabled is specified, docker will be used by default.
By default, docker will use kaniko as fallback when DevSpace is unable to reach the Docker host.
Build Tool Priority
If you specify multiple build tools, DevSpace will try to use them in the following order:
1. disabled
2. custom
3. docker (uses kaniko as fallback if Docker host not reachable)
4. kaniko
kaniko:# struct | Options for building images with kaniko
cache:true # bool | Use caching for kaniko build process
annotations:{}# map | Extra annotations for the kaniko build pod
labels:{}# map | Extra labels for the kaniko build pod
snapshotMode:"time"# string | Type of snapshotMode for kaniko build process (compresses layers)
insecure:false # bool | Allow working with an insecure registry by not validating the SSL certificate (Default: false)
command:[]# string[] | Array of strings for the kaniko pod
args:[]# string[] | Array of additional args for kaniko build command
image:""# string | Allows to change the kaniko image or kaniko version / image tag.
initImage:""# string | Allows to change the init container kaniko image (defaults to alpine)
serviceAccount:""# string | The service account to use for this build pod
nodeSelector:{}# map | A key value map of node labels to select a node for the build pod
pullSecret:""# string | Mount this Kubernetes secret instead of creating one to authenticate to the registry (default: "")
additionalMounts:[]# struct[] | Array of mount configurations for Kubernetes Secrets and ConfigMaps that should be mounted into the kaniko build container
namespace:""# string | Kubernetes namespace to run kaniko build pod in (Default: "" = deployment namespace)
options:...# struct | Set build general build options
skipPullSecretMount:true # bool | If true devspace will not mount and create any image pull secret for the kaniko pod
env:{}# map | Key value pairs of environment variables that should be added to the kaniko pod
initEnv:{}# map | Key value pairs of enviroment variables that should be added to the kaniko init pod
kubectl:# struct | Options for deploying with "kubectl apply"
manifests:[]# string[] | Array containing glob patterns for the Kubernetes manifests to deploy using "kubectl apply" (e.g. kube or manifests/service.yaml)
kustomize:false # bool | Use kustomize when deploying manifests via "kubectl apply" (Default: false)
replaceImageTags:true # bool | Enable automated tag replacement (Default: true)
applyArgs:[]# string[] | Array of args for the "kubectl apply" command during deployment
createArgs:[]# string[] | Array of args for the "kubectl create" command during deployment
kustomizeArgs:[]# string[] | Array of args for the "kustomize build" command during deployment
deleteArgs:[]# string[] | Array of args for the "kubectl delete" command when purging deployments
cmdPath:""# string | Path to the kubectl binary (Default: "" = detect automatically)
autoReload:# struct | Options for auto-reloading (i.e. re-deploying deployments and re-building images)
paths:[]# string[] | Array containing glob patterns of files that are watched for auto-reloading (i.e. reload when a file matching any of the patterns changes)
deployments:[]# string[] | Array containing names of deployments to watch for auto-reloading (i.e. reload when kubectl manifests or files within the Helm chart change)
images:[]# string[] | Array containing names of images to watch for auto-reloading (i.e. reload when the Dockerfile changes)
dependencies:# struct[] | Array of dependencies (other projects containing a devspace.yaml or devspace-configs.yaml) that need to be deployed before this project
-source:# struct | Defines where to find the dependency (exactly one source is allowed)
git: https://github.com/my-repo # string | HTTP(S) URL of the git repository (recommended method for referencing dependencies, must have the format of the git remote repo as usually checked out via git clone)
subPath: repo/sub/path # string | Path within the git repo where devspace.yaml can be found
disableShallow:false # bool | Allows to disable shallow git clones using "--depth 1"
cloneArgs:[]# string[] | Array of args for the "git clone" command for retrieving git based dependencies
path: ../../my-projects/repo # string | Path to a project on your local computer (not recommended, instead of using git-related options)
profile: default # string | Name of the profile used to deploy this dependency (when multiple profiles are defined in the devspace.yaml of the dependency)
skipBuild:false # bool | Do not build images of this dependency (= only start deployments)
ignoreDependencies:false # bool | Do not build and deploy dependencies of this dependency
namespace:""# string | Kubernetes namespace to deploy dependency to (Default: default namespace of current kube-context)
vars:# struct[] | Variables in the dependency config that should be overriden with the specified values
-command:"./scripts/my-hook"# string | Command to be executed when this hook is triggered
args:[]# string[] | Array of arguments for the command of this hook
os: darwin # string | If specified then this hook is only executed on the given operating system
background:false # bool | If true DevSpace will not wait for the command to finish and directly move on
silent:false # bool | If true DevSpace will not print any command output to the console
where:
container:# struct | If specified, DevSpace will run the command in the container instead of locally
imageName: my-image # string | Name of an image defined in `images` to select pods with
labelSelector:...# struct | Key Value map of labels and values to select pods with
containerName:""# string | Container name to use after selecting a pod
namespace:""# string | Kubernetes namespace to select pods in
when:# struct | Trigger for executing this hook
before:# struct | Run hook before a certain execution step
pullSecrets:"all"# string | "all" for running hook before creating image pull secrets
dependencies:"all"# string | "all" for running hook before deploying dependencies
images:"all"# string | "all" for running hook before building the first image
deployments:"all"# string | Name of the deployment you want to run this hook before deploying OR "all" for running hook before deploying the first deployment
after:# struct | Run hook after a certain execution step
pullSecrets:"all"# string | "all" for running hook after creating image pull secrets
dependencies:"all"# string | "all" for running hook after deploying dependencies
images:"all"# string | all" for running hook after building the last image
deployments:"all"# string | Name of the deployment you want to run this hook after deploying OR "all" for running hook after deploying the last deployment
onError:
pullSecrets:"all"# string | "all" for running hook if an error occurs during creating image pull secrets
dependencies:"all"# string | "all" for running hook if an error occurs during deploying dependencies
images:"all"# string | all" for running hook if an error occurs during building images
deployments:"all"# string | Name of the deployment you want to run this hook if an error occurs during deploying OR "all" for running hook if an error occurs during deploying any deployment