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 - New option
hooks[*].name
to name hooks - DevSpace will now ping the underlying connection during reverse port forwarding to detect hanging connections
- DevSpace helper will now close automatically if multiple pings are missed
- 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- Fixed an issue where DevSpace would not rebuild even though the image would not be present in the local docker daemon
- 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
- Fixed an issue where
deployments[*].helm.timeout
was a number instead of a string - Using devspace within a command or hook will now target the current executed binary
- DevSpace will now try initially to download the devspacehelper in the container instead of uploading it (#1729)