Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 2.26 KB

v0.28.md

File metadata and controls

41 lines (30 loc) · 2.26 KB

v0.28

Release notes

Upgrading from: v0.27.0

What Changed from v0.27.0

CUE Module

This version includes a CUE upgrade, which adds some additional requirements to your cue.mod/module.cue file. Your CUE module is now required to be domain-qualified, so a module like foo/kinds must be changed to github.com/example/foo/kinds or foo.grafana.app/kinds (or similar). By default, new projects created with grafana-app-sdk project init without a domain in their go module will use <module name>.grafana.app as their domain. Additionally, the cue.mod/module.cue file must contain a language: version section, specifying the CUE language version to use when parsing. By default in new projects, we now use language: version: "v0.8.2", so the simplest update to this is to add that line after your module section in the file.

An update of an example old cue.mod/module.cue:

module: "foo/kinds"

Should be transformed to:

module: "foo.grafana.app/kinds"
language: version: "v0.8.2"

Tip

You can create a new project with grafana-app-sdk init <modname> to see the current valid state of a <kinds dir>/cue.mod/module.cue file

Operator New Methods

The various New functions in the operator package have been simplified to single NewX functions with options objects. If you use simple.App or simple.Operator, you shouldn't need to make any changes, but if you are building a custom operator, this will apply to you.

  • NewKubernetesBasedInformer and NewKubernetesBasedInformerWithFilters have been reduced to just NewKubernetesBasedInformer(resource.Kind, ListWatchClient, KubernetesBasedInformerOptions)
  • NewMemcachedInformer and NewMemcachedInformerWithFilters have been reduced to just NewMemcachedInformer(resource.Kind, ListWatchClient, MemcachedInformerOptions)

Migration Steps

To migrate your CUE module file, use the following steps:

  1. If your module section is not domain-qualified (does not start with a domain with a . in it), add a domain to your module, such as changing foo/kinds to foo.grafana.app/kinds.
  2. Add the line language: version: "v0.8.2" below your module line