Release Announcement: Garden 0.12.25

Garden 0.12.25 is out! :tada:

This is a big release! We’ve made significant enhancements to the performance, stability and flexibility of dev mode, added a new configmap module type and a self-update command.

Also included in this release are some significant performance improvements to Garden’s startup time for larger projects, and a bunch of quality-of-life-oriented improvements and options for everyday work with Garden.

Here are a few of the highlights, but please check the release notes for the full list of changes.

Many thanks to @ITHedgeHog, @zyulyaev, @JoshDrake-minted, Bela Bagameri and @bdbelevate for their contributions to this release.

Happy hacking!

Dev mode: Improved stability, and new configuration options

We’ve improved the process management for our dev mode syncs, which should make dev mode more robust under challenging conditions—just the thing to ensure long, uninterrupted sessions of productive focus work.

Additionally, we’ve added several configuration options for file permissions, which makes it easier to get up and running with dev mode for many projects.

Experimental Mutagen-based build sync mode

You can now set GARDEN_K8S_BUILD_SYNC_MODE=mutagen to enable a new, as yet experimental build sync mode, which replaces rsync with Mutagen for synchronizing build contexts ahead of kaniko and cluster-buildkit builds.

Some users have encountered rsync-related issues during builds (especially when using Windows dev machines). Mutagen sidesteps these issues, and should be more robust in those situations.

Eventually, we hope to replace rsync with Mutagen entirely, but we want to thoroughly battle-test the new sync implementation before making it the new default.

Please give it a try and let us know what you think!

New module type: configmap

This new module type facilitates mounting ConfigMap resources as volumes on container, kubernetes and helm modules.

This can be very useful for providing configuration values to services, tests and tasks in a reusable way.

Example:

kind: Module
name: my-configmap
type: configmap
data:
  # Use template strings in the keys/values as desired
  config.properties: |
    some: data
    or: something
---
kind: Module
name: my-module
type: container
services:
  - name: my-service
    volumes:
      - name: my-configmap
        module: my-configmap
        containerPath: /config
    ...

This mounts all the keys in the data field on the my-configmap module under the /config directory in the container. In this case, you’ll find the file /config/config.properties there, with the value above (some: data ...) as the file contents.

You can do the same for tests and tasks using the tests.volumes and tasks.volumes fields. configmap volumes can of course also be referenced in kubernetes and helm modules, since they are deployed as standard ConfigMap resources.

self-update command

Does pretty much what it says on the tin—updates the locally installed Garden CLI.

You can also specify a specific version to install (including edge), and install to a specified directory.

This makes it easier to ensure that everyone on your team is using the latest version of Garden.

More flexible port-forwarding

You can now explicitly configure the ports to forward for kubernetes and helm modules, including which local port to forward to.

Example:

kind: Module
type: kubernetes
...
portForwards:
  - name: http
    resource: Service/my-service
    targetPort: 80
    localPort: 8080

Additionally, Garden now does port-forwarding to Deployments and DaemonSets.

Previously we only created port forwards for Service resources. We still prefer those when applicable but also create port forwards directly to Deployment and DaemonSet container ports.