github garden-io/garden 0.12.25

latest releases: edge-bonsai, 0.12.68, 0.13.29...
2 years ago

Garden 0.12.25 is out! 🎉

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 changelog below 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.

Changelog

Features

  • allow passing additional tolerations to kaniko pods (#2540) (3748092c)
  • add ephemeralStorage limit and request configuration parameters for kubernetes builder, registry and sync (1a9e2979)
  • cli: add self-update command (6dd23340)
  • cloud: stream command metadata (de925e4c)
  • core: stream build statuses (4bd1d0f3)
  • k8s: add experimental mutagen-based build sync mode (1d3e3072)
  • k8s: allow setting podSelector on helm/kubernetes resource refs (43e7cc82)
  • k8s: manual port forward config for helm and kubernetes modules (9111a480)
  • k8s: add timeout parameter to kubernetes module type (708f4c39)
  • k8s: allow owner/perm tweaks on dev mode syncs (eb4be420)
  • k8s: port-forward to Deployments and DaemonSets (8c2b7474)
  • k8s: add configmap module type, mountable on container modules (809dcb8c)

Improvements

  • cli: move error.log to .garden/error.log (e13365e2)
  • core: don't explicitly create build tasks in dev command (0aa68e20)
  • core: do not truncate logger sections (f462e3ac)
  • k8s: better process mgmt and logging for dev mode sync (7a01e41b)

Bug Fixes

  • k8s: error fetching mutagen CLI on Windows (db362d95)
  • cli: avoid cmd.exe windows popping up during execution (ddb5ab93)
  • cli: don't print dev cmd banner when terminal doesn't support it (3a637250)
  • cli: error at end of process when writing error log (cb68b2a4)
  • config: module variables weren't propagated right at parse time (b1c52fab)
  • container: fix hot reload target validation (2d471360)
  • core: deploy command wouldn't start port forwards with dev flag (08b1e172)
  • core: bump file watcher DEFAULT_BUFFER_INTERVAL to 1250 (d46e4578)
  • core: don't omit dev mode services from deployment dependencies (2a5df7cc)
  • core: warn instead of error when attempting to scan non-directory (d668622b)
  • core: bad error messages for certain error types (8500aec5)
  • core: performance issue with certain dependency structures (b72de2e8)
  • core: allow empty replacement strings in 'replace' helper function (3686fb43)
  • k8s: correctly handle Ingress API versions for container modules (3764dfa7)
  • k8s: persistentvolumeclaim modules would include unnecessary files (41116475)
  • k8s: error when using dev mode on certain kubernetes modules (5bfb3d70)
  • k8s: intermittent errors when building/syncing to cluster (d2828370)
  • k8s: unexpected error when losing exec WS connection (9400d630)
  • k8s: error when re-starting registry in cleanup script (5b8fe40c)
  • k8s: bad handling of directory paths for artifact sources (92ee09a5)
  • k8s: resolve issue with buildkit not caching (#2480) (37f1f762)
  • templates: uuidv4() helper function was broken (6c14777f)

Code Refactoring

  • k8s: officially deprecate the cluster-docker build mode (925b291a)

Don't miss a new garden release

NewReleases is sending notifications on new releases.