Releases: devspace-sh/devspace
Releases · devspace-sh/devspace
v4.0.0
*** BREAKING CHANGES ***
Removed devspace-configs.yaml
- Profiles instead of multiple configs: We reworked how multiple configs in devspace are handled because we felt that it was currently too complicated and inflexible. Instead of creating a separate file besides
devspace.yaml
, you can now define different 'profiles' directly in thedevspace.yaml
instead of having different configs (see profiles documentation). - Config patches instead of overrides: We removed the config override mechanism. Instead of overriding the config in the old way, you are now able to either completely replace parts of the config (the top level keys like
images
,deployments
etc.) or patch specific fields in the config by providing 1) a jsonpath or xpath to the config option, 2) an operation (replace, add, remove) and 3) a value. We believe this gives the user more power of how values can be overridden (especially for alterations of arrays). At the same time, patches seem easier to use and understand than the previous override system although they might require more lines of config (see patches documentation).
This is a basic example how a devspace.yaml
with multiple profiles and patches can look like:
version: v1beta3
images:
test:
image: myimage
deployments:
- name: test
component:
containers:
- image: myimage
profiles:
# A profile name
- name: myprofile
# Replacement parts which will completely replace a part of the config
replace:
# images: {} Will replace images completely with an empty configuration
# deployments: {}
dev:
ports:
- imageName: test
forward:
- port: 8080
# With patches you have to option to replace, add or remove certain parts of the configuration
patches:
# Will remove the image test
- op: remove
path: images.test
# Replaces the image name in the deployment with nginx
- op: replace
path: deployments[0].component.containers[0].image
value: nginx
- Config variables are now also defined directly in the
devspace.yaml
. DevSpace will only ask the variables in the currently used profile which means you can define all config variables for all profiles in one place (see variables documentation):
version: v1beta3
deployments:
# This will be filled with a question on `devspace deploy` or `devspace dev`, alternatevly you could also set the
# environment variable SELECT to avoid the question and fill it automatically
- name: ${SELECT}
component:
containers:
- image: ${IMAGE}
- image: nginx:${SOME_ENV_VAR}
vars:
- name: SELECT
question: Please choose a deployment name
options:
- deployment-1
- deployment-2
- name: IMAGE
question: Please specify an image name, or press enter to use 'nginx'
default: nginx
source: input
validationPattern: ^n.*$
validationMessage: Only image names that start with a 'n' are allowed
- name: UNUSED
question: This variable is not asked because it is not used in the config above
Other breaking changes
- Removed the config option
cluster.kubeContext
andcluster.namespace
since this caused some confusion which kube-context and namespace were used during deployment. Instead DevSpace will now always use the current kube-context (or the context passed via the--kube-context
flag) and remember the most recently used kube-context and namespace. If the user starts the deployment process usingdevspace dev
ordevspace deploy
, DevSpace will print a warning if the current kube-context is different than the previously used one and wait a couple of seconds to give the user the chance to abort the command and prevent that the user accidentally deploys to the wrong cluster or namespace. - Removed
devspace install
since this command is no longer needed - Renamed
devspace use/list config(s)
intodevspace use/list profile(s)
- Removed
devspace add/list/remove selector
devspace dev
will not rebuild images if there were changes in the image context path- The shortcut flag for
--pick
-p
was removed.-p
is not used as--profile
shortcut flag - The config option
dev.overrideImages.dockerfile
anddev.overrideImages.context
were removed.dev.overrideImages
was renamed todev.interactive
. The config will be automatically converted viadevspace update config
*** New Features ***
- New config version
v1beta3
(rundevspace update config
to convert your current config automatically) - Custom commands: The idea of custom commands is that the more experienced developers on your team define a set of useful commands and store them in the devspace.yaml, commit and push this config to the code repository via git and then, let other team mates run them without having to remember all the details or having to read through endless pages of internal workflow documentation (see custom commands documentation).
Example:
# File: devspace.yaml
version: v1beta3
images:
default:
image: john/backend
commands:
- name: debug-backend
command: "devspace dev -i --profile=debug-backend"
profiles:
- name: debug-backend
patches:
- op: replace
path: images.default.entrypoint
value: ["npm", "run", "debug"]
You can execute custom commands with: devspace run debug-backend
- There are now a bunch of global flags that can be used for every command:
--debug - Prints the stack trace if an error occurs
--silent - Run in silent mode and prevents any devspace log output except fatals & panics
--no-warn - If true does not show any warning when deploying into a different namespace or kube-context than before
--profile - The devspace profile to use (if there is any)
--namespace - The kubernetes namespace to use
--kube-context - The kubernetes context to use
--var - Variables to override during execution (e.g. --var=MYVAR=MYVALUE)
- Profiles: you are now able to specify multiple profiles in
devspace.yaml
and switch between those profiles via thedevspace use profile
command or the--profile / -p
flag. See multiple profiles for an example how to use profiles. - Config Patches: you are now able to specify config patches in profiles to override certain parts of the config (see multiple profiles for an example). This makes it easy to reuse most of the config and exchange only small parts.
devspace dev
is now able to log multiple pods to the console. To enable this behavior by default strip the config optiondev.interactive
from yourdevspace.yaml
.- Interactive mode: when using
devspace dev -i
you can choose an image which should be started in interactive mode. This means that the image entrypoint will be overriden by a sleep command and a terminal to that image will be openend. Interactive mode can be configured as default to mimic old behaviour with the config optiondev.interactive.enabled
anddev.interactive.images
.dev.terminal
was moved todev.interactive.terminal
(see interactive mode documentation). - New config option
dev.sync[*].imageName
anddev.sync[*].imageName
as an alternative tolabelSelector
. WithimageName
DevSpace will automatically find the pods in which the image is used and start sync or port-forwarding. For a working example take a look at quickstart - New config option
dev.open
: you can DevSpace now automatically open the browser to a certain webpage likehttp://localhost:8080
(see auto-open documentation). - New command
devspace use context
to switch the current kube-context anddevspace use namespace
to switch the current configured default namespace in the kube-context - New command
devspace attach
that allows users to attach to a specific pod and container (behaves like kubectl attach but has a picker to select pods) - New flag
--verbose-dependencies
indevspace dev/deploy/purge/build
to print the output of dependency deployment - New config option
dev.logs
: you can specify if DevSpace should display image logs ondevspace dev
and what images should be logged (see multi-container log streaming documentation). - New config option
images[*].entrypoint
&images[*].cmd
which allows you to specify an entrypoint and cmd that will be used during deployment (also works with multi stage build) - New config option
deployments[*].kubectl.replaceImageTags
,deployments[*].helm.replaceImageTags
&deployments[*].component.options.replaceImageTags
to prevent automatic replacement of image tags for deployments
*** Changes & Fixes ***
- Renamed config option
dependencies[*].config
intodependencies[*].profile
- Removed config option
dev.selectors
(will be converted automatically), use imageName where possible instead - Removed config options
.selector
and--selector
flags, use imageName where possible instead - Fixed issue in dependency resolving where dependency variables were not correctly used
- Show warning if current built tag is the same as last built tag
- Overriding image entrypoints now also works with multi staged builds
- DevSpace now prefers the git cli for git dependencies if the cli is installed locally
*** What do you need to do? ***
- P...
v3.5.18
Changes:
- Added subPath option to define a sub git repository path (#649)
- Use credential helper for git if possible (#648)
- Fixed bug where a branch wasn't correctly checked out (#647)
- Fixed bug where dependency config option would cause a panic
- Fixed bug where running "devspace remove deployment --all" or "devspace remove image--all" would cause a panic (#645)
- Fixed an issue where multiple definitions of the same repository but with a different branch, tag or revision would be treated as a single dependency
v3.5.17
Changes:
- Improved
devspace enter
,devspace dev
anddevspace sync
commands: kubernetes connections will now stay open and shouldn't be killed anymore after the idle timeout by the kube api server (#639 & #511) - Adds new predefined variables for DEVSPACE_SPACE_NAMESPACE and DEVSPACE_SPACE_DOMAIN1, DEVSPACE_SPACE_DOMAIN2 etc. (#641)
- Adds a picker for
devspace use
commands if no arguments were specified (#640) - Fixes a bug in the sync where the exclude paths were not applied relatively on the server side (#630)
- Fixes a bug in kaniko builder where the dockerfile was not correctly overriden (#644)
- Fixes a bug in
devspace connect cluster
where the name flag was not correctly working (#600)
v3.5.16
Changes:
- Config variable names can now be loaded directly as environment variables (e.g. a config variable ${IMAGE} can be loaded from environment variable IMAGE or DEVSPACE_VAR_IMAGE)
- Add new config variable option source with values "all", "env" or "input", which specify from which source the config variable should be loaded (default is "all") (#637)
- Config variables can now be escaped by appending a '$' (e.g. $${Test} is escaped for ${Test})
- You can now specify an ingress in components (#635)
devspace add provider
now also switches the default provider (#632)- Improve activity detection for sleep mode (#633)
v3.5.15
v3.5.14
Changes:
- New
devspace build
command, that will only build and push images specified in the config (#606) devspace dev
&devspace enter
now return the correct command exit code (#614)devspace list deployments
will resume a sleeping space now (#621)- Add --skip-build flag for
devspace deploy
anddevspace dev
(#622) - New namespace config option for dependencies (#605)
- Fix an issue with installing devspace with npm (#618)
- Fix a potential nil pointer panic during
devspace use space
(#615)
v3.5.12
Changes:
- You can now specify the branch, revision and tag for a git dependency (#591)
- New
devspace reset vars
command that resets the specified vars for the current config (#592) - New
devspace use provider
command to easily set the default provider to an on-premise DevSpace Cloud version - On-premise DevSpace Cloud support
- Fixed an issue with
devspace add port
where the port was not correctly added
v3.5.10
v3.5.9
Changes:
- Fixed an issue where the local .devspace folder was not correctly excluded from sync
v3.5.8
Changes
- New
devspace cleanup images
command to conveniently cleanup built images from devspace from docker - Fixed issue where only maximum of one hook per stage was executed