DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
APACHE-2.0 License
Bot releases are hidden (Show)
Published by FabianKramm almost 3 years ago
require
constraints (#1826)Published by FabianKramm almost 3 years ago
Published by FabianKramm almost 3 years ago
DevSpace now supports automatic profile activation via DevSpace variables. This allows you to auto activate profiles based on selected namespace, kube context or even custom commands:
profiles:
- name: test
activation:
- vars:
devspace.namespace: test
patches:
- op: remove
path: deployments
Added runtime variables that are prefixed with ${runtime.}
and replace the helper syntax image()
and tag()
. Those variables are useful to access certain runtime information, such as hook output or image tags, but can only be used in certain config areas that will be evaluated later on (such as deployments.*.helm.values
):
images:
app:
image: myuser/image
deployments:
- name: checkout
helm:
chart:
name: ./kubernetes/helm/app
values:
app:
image:
repo: ${runtime.images.app.image} # old was image(app)
tag: ${runtime.images.app.tag} # old was tag(app)
DevSpace now also supports hook output runtime variables:
images:
app:
image: myuser/image
hooks:
- name: "image-digest"
command: |
# This command prints the image digest
echo $(docker inspect ${runtime.images.app.image}:${runtime.images.app.tag} --format='{{index .RepoDigests 0}}' | cut -d'@' -f2)
events: ["after:build:app"]
deployments:
- name: checkout
helm:
chart:
name: ./kubernetes/helm/app
values:
app:
image:
digest: ${runtime.hooks.image-digest.stdout}
Runtime variables can also be used together with config expressions:
images:
app:
image: myuser/image
deployments:
- name: checkout
helm:
chart:
name: ./kubernetes/helm/app
values:
app:
image:
digest: $(echo $(docker inspect ${runtime.images.app.image}:${runtime.images.app.tag} --format='{{index .RepoDigests 0}}' | cut -d'@' -f2))
profiles: $(cat profiles.yaml)
profiles:
- $(cat profile1.yaml)
profiles:
- name: production
merge:
deployments: $(cat production.yaml)
images:
default:
image: myuser/image
build:
custom:
skipImageArg: true
command: |-
# Also works on windows as this is executed in a golang shell
docker build -t ${runtime.images.default.image}:${runtime.images.default.tag} . -f custom/Dockerfile
onChange:
- main.go
deployments.*.disabled
, dependencies.*.disabled
, pullSecrets.*.pullSecrets
& hooks.*.disabled
to make usage of those config areas easier to use with config expressions:hooks:
- name: load-into-kind
disabled: $( [ ${devspace.context} != "kind" ] && echo "true" || echo "false" )
command: |-
kind load docker-image ${runtime.images.app.image}:${runtime.images.app.tag}
events: ["before:deploy"]
before:resolveDependencies
, after:resolveDependencies
, error:resolveDependencies
, before:buildDependencies
, after:buildDependencies
, error:buildDependencies
, before:deployDependencies
, after:deployDependencies
, error:deployDependencies
, before:purgeDependencies
, after:purgeDependencies
, error:purgeDependencies
that also work for nested dependenciesdocker-compose.yaml
when running devspace init
and provides an option to generate an initial devspace.yaml from docker composedevspace.yaml
configured commands to cobra command configuration and shows them in devspace --help
and devspace run --help
-s
flag and instead DevSpace will now ask if the Kube context or the namespace has changed--dependency
flag for devspace print
to show a loaded dependency configdeployments.helm.chart.git
to deploy a helm chart from a git repository instead of helm registrydev.replacePods.persistPaths.initConainter.resources
to configure resources for the pre-populating init container (#1775).
. The old predefined variable names can still be used, but are deprecated--debug
is specified and show if a file wasn't syncedreplacePods[*].containerName
if multiple containers are found within a replaced pod and no replacePods[*].persistPaths[*].containerName
is definedtest
would match test123
too many files open
(#1444)devspace build
would fail if there wasn't a valid kube context (thanks @wollowizard) (#1769)Published by FabianKramm almost 3 years ago
DevSpace now supports automatic profile activation via DevSpace variables. This allows you to auto activate profiles based on selected namespace, kube context or even custom commands:
profiles:
- name: test
activation:
- vars:
devspace.namespace: test
patches:
- op: remove
path: deployments
Added runtime variables that are prefixed with ${runtime.}
and replace the helper syntax image()
and tag()
. Those variables are useful to access certain runtime information, such as hook output or image tags, but can only be used in certain config areas that will be evaluated later on (such as deployments.*.helm.values
):
images:
app:
image: myuser/image
deployments:
- name: checkout
helm:
chart:
name: ./kubernetes/helm/app
values:
app:
image:
repo: ${runtime.images.app.image} # old was image(app)
tag: ${runtime.images.app.tag} # old was tag(app)
DevSpace now also supports hook output runtime variables:
images:
app:
image: myuser/image
hooks:
- name: "image-digest"
command: |
# This command prints the image digest
echo $(docker inspect ${runtime.images.app.image}:${runtime.images.app.tag} --format='{{index .RepoDigests 0}}' | cut -d'@' -f2)
events: ["after:build:app"]
deployments:
- name: checkout
helm:
chart:
name: ./kubernetes/helm/app
values:
app:
image:
digest: ${runtime.hooks.image-digest.stdout}
Runtime variables can also be used together with config expressions:
images:
app:
image: myuser/image
deployments:
- name: checkout
helm:
chart:
name: ./kubernetes/helm/app
values:
app:
image:
digest: $(echo $(docker inspect ${runtime.images.app.image}:${runtime.images.app.tag} --format='{{index .RepoDigests 0}}' | cut -d'@' -f2))
profiles: $(cat profiles.yaml)
profiles:
- $(cat profile1.yaml)
profiles:
- name: production
merge:
deployments: $(cat production.yaml)
images:
default:
image: myuser/image
build:
custom:
skipImageArg: true
command: |-
# Also works on windows as this is executed in a golang shell
docker build -t ${runtime.images.default.image}:${runtime.images.default.tag} . -f custom/Dockerfile
onChange:
- main.go
deployments.*.disabled
, dependencies.*.disabled
, pullSecrets.*.pullSecrets
& hooks.*.disabled
to make usage of those config areas easier to use with config expressions:hooks:
- name: load-into-kind
disabled: $( [ ${devspace.context} != "kind" ] && echo "true" || echo "false" )
command: |-
kind load docker-image ${runtime.images.app.image}:${runtime.images.app.tag}
events: ["before:deploy"]
before:resolveDependencies
, after:resolveDependencies
, error:resolveDependencies
, before:buildDependencies
, after:buildDependencies
, error:buildDependencies
, before:deployDependencies
, after:deployDependencies
, error:deployDependencies
, before:purgeDependencies
, after:purgeDependencies
, error:purgeDependencies
that also work for nested dependenciesdocker-compose.yaml
when running devspace init
and provides an option to generate an initial devspace.yaml from docker composedevspace.yaml
configured commands to cobra command configuration and shows them in devspace --help
and devspace run --help
-s
flag and instead DevSpace will now ask if the Kube context or the namespace has changed--dependency
flag for devspace print
to show a loaded dependency configdeployments.helm.chart.git
to deploy a helm chart from a git repository instead of helm registrydev.replacePods.persistPaths.initConainter.resources
to configure resources for the pre-populating init container (#1775).
. The old predefined variable names can still be used, but are deprecated--debug
is specified and show if a file wasn't syncedreplacePods[*].containerName
if multiple containers are found within a replaced pod and no replacePods[*].persistPaths[*].containerName
is definedtest
would match test123
too many files open
(#1444)devspace build
would fail if there wasn't a valid kube context (thanks @wollowizard) (#1769)Published by FabianKramm almost 3 years ago
docker-compose.yaml
when running devspace init
and provides an option to generate an initial devspace.yaml from docker composedevspace.yaml
configured commands to cobra command configuration and shows them in devspace --help
and devspace run --help
-s
flag and instead DevSpace will now ask if the Kube context or the namespace has changed--dependency
flag for devspace print
to show a loaded dependency configdeployments.helm.chart.git
to deploy a helm chart from a git repository instead of helm registrydev.replacePods.persistPaths.initConainter.resources
to configure resources for the pre-populating init container (#1775)--debug
is specified and show if a file wasn't syncedreplacePods[*].containerName
if multiple containers are found within a replaced pod and no replacePods[*].persistPaths[*].containerName
is definedtest
would match test123
too many files open
(#1444)devspace build
would fail if there wasn't a valid kube context (thanks @wollowizard) (#1769)Published by FabianKramm almost 3 years ago
docker-compose.yaml
when running devspace init
and provides an option to generate an initial devspace.yaml from docker composedevspace.yaml
configured commands to cobra command configuration and shows them in devspace --help
and devspace run --help
-s
flag and instead DevSpace will now ask if the Kube context or the namespace has changed--dependency
flag for devspace print
to show a loaded dependency configdeployments.helm.chart.git
to deploy a helm chart from a git repository instead of helm registrydev.replacePods.persistPaths.initConainter.resources
to configure resources for the pre-populating init container (#1775)--debug
is specified and show if a file wasn't syncedreplacePods[*].containerName
if multiple containers are found within a replaced pod and no replacePods[*].persistPaths[*].containerName
is definedtoo many files open
(#1444)devspace build
would fail if there wasn't a valid kube context (thanks @wollowizard) (#1769)Published by FabianKramm almost 3 years ago
docker-compose.yaml
when running devspace init
and provides an option to generate an initial devspace.yaml from docker composedevspace.yaml
configured commands to cobra command configuration and shows them in devspace --help
and devspace run --help
-s
flag and instead DevSpace will now ask if the Kube context or the namespace has changed--dependency
flag for devspace print
to show a loaded dependency configdeployments.helm.chart.git
to deploy a helm chart from a git repository instead of helm registrydev.replacePods.persistPaths.initConainter.resources
to configure resources for the pre-populating init container (#1775)too many files open
(#1444)devspace build
would fail if there wasn't a valid kube context (thanks @wollowizard) (#1769)Published by FabianKramm almost 3 years ago
docker-compose.yaml
when running devspace init
and provides an option to generate an initial devspace.yaml from docker compose-s
flag and instead DevSpace will now ask if the Kube context or the namespace has changeddev.replacePods.persistPaths.initConainter.resources
to configure resources for the pre-populating init container (#1775)dev.replacePods.persistPaths.initConainter.resources
to configure resources for the pre-populating init container (#1775)too many files open
(#1444)devspace build
would fail if there wasn't a valid kube context (thanks @wollowizard) (#1769)Published by FabianKramm almost 3 years ago
docker-compose.yaml
when running devspace init
and provides an option to generate an initial devspace.yaml from docker compose-s
flag and instead DevSpace will now ask if the Kube context or the namespace has changeddev.replacePods.persistPaths.initConainter.resources
to configure resources for the pre-populating init container (#1775)devspace build
would fail if there wasn't a valid kube context (thanks @wollowizard) (#1769)Published by FabianKramm almost 3 years ago
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
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
dev.replacePods[*].name
to define a name for the replace pods configurationdev.replacePods[*].persistenceOptions
that allows you to define PVC options for the dev.replacePods[*].persistPaths
feature--name
for devspace restart
to select a sync confighooks[*].name
to name hookskubectl
or helm
if those commands are used in a hook and not found locallydev.replacePods
are now replaced in paralleldev.ports
are now started in parallelApplied additional flags from environment
messagedev.replacePods
and dev.ports
deployments[*].helm.timeout
was a number instead of a stringPublished by FabianKramm almost 3 years ago
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
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
dev.replacePods[*].name
to define a name for the replace pods configurationdev.replacePods[*].persistenceOptions
that allows you to define PVC options for the dev.replacePods[*].persistPaths
feature--name
for devspace restart
to select a sync confighooks[*].name
to name hookskubectl
or helm
if those commands are used in a hook and not found locallydev.replacePods
are now replaced in paralleldev.ports
are now started in parallelApplied additional flags from environment
messagedev.replacePods
and dev.ports
deployments[*].helm.timeout
was a number instead of a stringPublished by FabianKramm almost 3 years ago
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
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
dev.replacePods[*].name
to define a name for the replace pods configurationdev.replacePods[*].persistenceOptions
that allows you to define PVC options for the dev.replacePods[*].persistPaths
feature--name
for devspace restart
to select a sync confighooks[*].name
to name hookskubectl
or helm
if those commands are used in a hook and not found locallydev.replacePods
are now replaced in paralleldev.ports
are now started in parallelApplied additional flags from environment
messagedev.replacePods
and dev.ports
deployments[*].helm.timeout
was a number instead of a stringPublished by FabianKramm almost 3 years ago
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
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
dev.replacePods[*].name
to define a name for the replace pods configurationdev.replacePods[*].persistenceOptions
that allows you to define PVC options for the dev.replacePods[*].persistPaths
feature--name
for devspace restart
to select a sync confighooks[*].name
to name hookskubectl
or helm
if those commands are used in a hook and not found locallydev.replacePods
are now replaced in paralleldev.ports
are now started in parallelApplied additional flags from environment
messagedev.replacePods
and dev.ports
deployments[*].helm.timeout
was a number instead of a stringPublished by FabianKramm almost 3 years ago
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
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
dev.replacePods[*].name
to define a name for the replace pods configurationdev.replacePods[*].persistenceOptions
that allows you to define PVC options for the dev.replacePods[*].persistPaths
feature--name
for devspace restart
to select a sync confighooks[*].name
to name hookskubectl
or helm
if those commands are used in a hook and not found locallydev.replacePods
are now replaced in paralleldev.ports
are now started in parallelApplied additional flags from environment
messagedev.replacePods
and dev.ports
deployments[*].helm.timeout
was a number instead of a stringPublished by FabianKramm almost 3 years ago
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
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
dev.replacePods[*].name
to define a name for the replace pods configurationdev.replacePods[*].persistenceOptions
that allows you to define PVC options for the dev.replacePods[*].persistPaths
feature--name
for devspace restart
to select a sync confighooks[*].name
to name hookskubectl
or helm
if those commands are used in a hook and not found locallydev.replacePods
are now replaced in paralleldev.ports
are now started in parallelApplied additional flags from environment
messagedev.replacePods
and dev.ports
deployments[*].helm.timeout
was a number instead of a stringPublished by FabianKramm almost 3 years ago
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
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
dev.replacePods[*].name
to define a name for the replace pods configurationdev.replacePods[*].persistenceOptions
that allows you to define PVC options for the dev.replacePods[*].persistPaths
feature--name
for devspace restart
to select a sync confighooks[*].name
to name hookskubectl
or helm
if those commands are used in a hook and not found locallydev.replacePods
are now replaced in paralleldev.ports
are now started in parallelApplied additional flags from environment
messagedev.replacePods
and dev.ports
deployments[*].helm.timeout
was a number instead of a stringPublished by FabianKramm almost 3 years ago
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
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
dev.replacePods[*].name
to define a name for the replace pods configurationdev.replacePods[*].persistenceOptions
that allows you to define PVC options for the dev.replacePods[*].persistPaths
feature--name
for devspace restart
to select a sync confighooks[*].name
to name hookskubectl
or helm
if those commands are used in a hook and not found locallydev.replacePods
are now replaced in paralleldev.ports
are now started in parallelApplied additional flags from environment
in devspace run
commandsdev.replacePods
and dev.ports
deployments[*].helm.timeout
was a number instead of a stringPublished by FabianKramm about 3 years ago
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
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
dev.replacePods[*].name
to define a name for the replace pods configurationdev.replacePods[*].persistenceOptions
that allows you to define PVC options for the dev.replacePods[*].persistPaths
feature--name
for devspace restart
to select a sync confighooks[*].name
to name hookskubectl
or helm
if those commands are used in a hook and not found locallydev.replacePods
are now replaced in paralleldev.ports
are now started in parallelApplied additional flags from environment
in devspace run
commandsdev.replacePods
and dev.ports
Published by FabianKramm about 3 years ago
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
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
dev.replacePods[*].name
to define a name for the replace pods configurationdev.replacePods[*].persistenceOptions
that allows you to define PVC options for the dev.replacePods[*].persistPaths
feature--name
for devspace restart
to select a sync confighooks[*].name
to name hookskubectl
or helm
if those commands are used in a hook and not found locallydev.replacePods
are now replaced in paralleldev.ports
are now started in parallelApplied additional flags from environment
in devspace run
commandsdev.replacePods
and dev.ports
Published by FabianKramm about 3 years ago
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
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
dev.replacePods[*].name
to define a name for the replace pods configurationdev.replacePods[*].persistenceOptions
that allows you to define PVC options for the dev.replacePods[*].persistPaths
feature--name
for devspace restart
to select a sync configkubectl
or helm
if those commands are used in a hook and not found locallydev.replacePods
are now replaced in paralleldev.ports
are now started in parallelApplied additional flags from environment
in devspace run
commandsdev.replacePods
and dev.ports