github devspace-sh/devspace v5.0.0

latest releases: v6.3.12, v6.3.11, v6.3.10...
3 years ago

BREAKING CHANGES

devspace-cloud related functionality was completely removed from devspace and moved into a separate devspace plugin devspace-cloud-plugin. To add devspace-cloud functionality again, execute:

devspace add plugin https://github.com/devspace-cloud/devspace-cloud-plugin

After installing the plugin, devspace should work the same way as before.

In addition to the devspace-cloud plugin, there is a new loft-devspace-plugin that will add loft cli functionality to devspace, similar to the devspace-cloud plugin. You can install the loft plugin via:

devspace add plugin https://github.com/loft-sh/loft-devspace-plugin

NOTE: Please make sure that you do not install the loft and devspace-cloud plugin at the same time, since they add commands that overlap with each other e.g. devspace login that will cause problems.

Plugins

Added plugins to devspace that extend the functionality of devspace by additional commands, variables and command extensions. A plugin in devspace is defined by a plugin.yaml that specifies the additional functionality and a platform dependent binary that executes that functionality.

devspace can add plugins via git, local path or an URL:

# Add plugin from git repo
devspace add plugin https://github.com/devspace-cloud/devspace-cloud-plugin

# Add plugin from url
devspace add plugin https://raw.githubusercontent.com/devspace-cloud/devspace-cloud-plugin/master/plugin.yaml

# Add plugin from local path
devspace add plugin ./my-folder/plugin.yaml

A plugin.yaml can look like this:

# Name of the plugin as shown in devspace list plugins and used for
# devspace update plugin and devspace remove plugin
name: devspace-cloud
# The semantic version of the plugin
version: 0.0.2
# Additional commands that are added to devspace
commands:
    # This will add the command devspace login
  - name: "login"
     # this args are prepended to the plugin binary, so when a user will call 'devspace login test test2 --flag 123'
     # devspace will call the plugin binary with 'plugin-binary plugin binary arg test test2 --flag 123'
    baseArgs: ["plugin", "binary", "arg"] 
    usage: "short description of command"
    description: "long description of command"
    # You can also add commands under already existing devspace subcommands
    # This will add the devspace command: devspace add provider
  - name: "provider"
    baseArgs: ["add", "provider"]
    subCommand: "add"
# Hooks are called before certain already existing commands are executed 
# in devspace, for example devspace dev
hooks:
    # will be executed when devspace dev is run by the user
  - event: dev 
    # this will call the plugin binary before devspace dev is called with: 'plugin-binary do something'
    baseArgs: ["do", "something"]
# You can also add predefined variables for the config via plugins
vars:
    # the name of the predefined variable 
    # that can be used within any devspace.yaml
  - name: DEVSPACE_SPACE
    # this will call the plugin binary when resolving this variable and expects the variable
    # output on stdout. Furthermore devspace will set the env variables 
    # DEVSPACE_PLUGIN_KUBE_CONTEXT_FLAG and DEVSPACE_PLUGIN_KUBE_NAMESPACE_FLAG
    # for the plugin, so the variable can change based on the supplied kube context or namespace
    baseArgs: ["vars", "space"]
# In this section the plugin binaries (or scripts) and their locations are defined
# if devspace cannot find a binary for the current runtime.GOOS and runtime.GOARCH
# it will not install the plugin
binaries:
  - os: darwin
    arch: amd64
    # can be either an URL or local path, could be also a script
    path: https://github.com/devspace-cloud/devspace-cloud-plugin/releases/download/v0.0.2/devspace-cloud-plugin-darwin-amd64
  - os: linux
    arch: amd64
    path: https://github.com/devspace-cloud/devspace-cloud-plugin/releases/download/v0.0.2/devspace-cloud-plugin-linux-amd64
  - os: linux
    arch: "386"
    path: https://github.com/devspace-cloud/devspace-cloud-plugin/releases/download/v0.0.2/devspace-cloud-plugin-linux-386
  - os: windows
    arch: amd64
    path: https://github.com/devspace-cloud/devspace-cloud-plugin/releases/download/v0.0.2/devspace-cloud-plugin-windows-amd64.exe
  - os: windows
    arch: "386"
    path: https://github.com/devspace-cloud/devspace-cloud-plugin/releases/download/v0.0.2/devspace-cloud-plugin-windows-386.exe

Other Changes

  • Added predefined variables DEVSPACE_NAMESPACE and DEVSPACE_CONTEXT (#1137)
  • Fixed an issue where kustomize was not used correctly (#1135)

Don't miss a new devspace release

NewReleases is sending notifications on new releases.