Conditional Sync Commands
- New option
dev.sync[*].onUpload.exec
that allows you to define commands that are executed on certain file changes. DevSpace makes sure that these commands are only executed after initial sync has finished and before the container might be restarted. For example:
deployments:
- name: app-backend
helm:
componentChart: true
values:
containers:
- image: john/devbackend
dev:
sync:
- imageSelector: john/devbackend
onUpload:
# These post-sync commands will be executed after DevSpace synced changes to the container in the given order
exec:
- onChange: ["./package.json"]
command: |-
npm install
Persistent Paths
- New option
dev.replacePods[*].persistPaths
that allows you to persist certain paths with PVCs within the replaced pod for quicker syncing. For example:
dev:
replacePods:
- imageSelector: my-app/dev
persistPaths:
- path: /app
# Optional path on the persistent volume to mount
# volumePath: /my-volume/app
# Optional name of the container to persist this path
# containerName: my-container
Changes
- New option
dev.replacePods[*].name
to define a name for the replace pods configuration - New option
dev.replacePods[*].persistenceOptions
that allows you to define PVC options for thedev.replacePods[*].persistPaths
feature - New flag
--name
fordevspace restart
to select a sync config - DevSpace will now download and install
kubectl
orhelm
if those commands are used in a hook and not found locally dev.replacePods
are now replaced in paralleldev.ports
are now started in parallel- Removed
Applied additional flags from environment
indevspace run
commands - Improved error message if no kube context was found
- Improved config validation
- Improved logging behaviour for
dev.replacePods
anddev.ports
- Updated default kaniko version to v1.6.0