github garden-io/garden 0.12.17

latest releases: 0.12.70, edge-bonsai, 0.12.69...
3 years ago

Garden 0.12.17 is out! 🎉

This release introduces several new features, and a brand-new build mode (which we're rather excited about).

See the changelog below for a full list of changes.

Many thanks to everyone who's been providing feedback and suggestions.

Enjoy!

New build mode: cluster-buildkit

This release adds a new cluster-buildkit build mode to the kubernetes provider, which uses the buildkit project.

This build mode works differently from the existing cluster-docker and kaniko build modes, in that it doesn't require any cluster-wide components.

When configured, a garden-buildkit Deployment with an ephemeral volume is deployed on-demand to the project namespace. This greatly simplifies administration and operation, while still offering a performance benefit compared to kaniko, and it still uses the deployment registry (in-cluster or otherwise) as a shared cache between users/namespaces.

It can also be configured to run in "rootless" mode, i.e. run without elevated privileges. This has some caveats (see the buildkit docs for details) but offers a much improved security profile compared to the privileged Docker and Kaniko builders.

See the in-cluster building guide for more details.

Improvements to the publish command

We've substantially improved the publish command, first off fixing issues when using remote deployment registries.

Second, we've added a --tag parameter that allows overriding the published image tag. Not only can you specify a specific string tag, but you can also template the tag, which is very handy in pipelines and when publishing several images at once. You can use most template tags otherwise available in module configuration files, plus a few additional ones—which is probably more than you need :) (but do let us know if you can use something more!)

Some usage examples:

  • Set a specific tag on all published modules: garden publish --tag "v1.2.3"
  • Set a custom prefix on tags but include the Garden version hash: garden publish --tag 'v0.1-${module.hash}'
  • Set a custom prefix on tags with the current git branch: garden publish --tag 'v0.1-${git.branch}'

See the Publishing Images docs for more details.

Annotations and labels for project namespace

You can now configure both annotations and labels on namespaces. The namespace field on the kubernetes provider now also accepts an object instead of just a string, so you can specify the desired
annotations and/or labels there.

These will be applied when creating namespaces, and Garden will also attempt to ensure those annotations and labels are on existing namespaces (emitting a warning if e.g. not allowed to modify the
namespace).

${command.name} and ${command.params} for templating

These new template variables allow users to template by the current command context in some interesting ways.

A simple example would be to template based on whether the test command is being run (e.g. to use different resource limits for services when running integration tests).

Here's a more advanced example:

${command.params contains 'hot' && command.params.hot contains 'my-service'}

which checks whether a particular service was deployed with hot reloading enabled.

Changelog

Features

  • config: add ${command.name} and ${command.params} for templating (d31922df)
  • core: lower case username for templates (d6b94aaf)
  • helm: allow disabling atomic installs/upgrades (6247cef1)
  • k8s: add clusterBuildkit.nodeSelector config option (91376d7e)
  • k8s: allow setting annotations and labels on project namespace (6f24beed)
  • k8s: add cluster-buildkit buildMode (15f2ab51)
  • publish: add template-able --tag parameter to publish command (51acfb2a)
  • template: allow escaping template strings for generated files (86cd2ffa)

Improvements

  • dashboard: better Stack Graph layout (665d82ea)

Bug Fixes

  • k8s: garden publish command now works with any deploymentRegistry (4fffdbfe)

Don't miss a new garden release

NewReleases is sending notifications on new releases.