v0.33.0
What's Changed in this Release
This release contains changes to code generation around the default status
subresource. The flag --genoperatorstate=(*true|false)
has been introduced, allowing a user to toggle off the default status
subresource in the generated code, CRD, and manifest. As a secondary effect of this change, generated CRDs with the default status
subresource will no longer contain x-kubernetes-preserve-unknown-fields: true
at the root level of the status
schema, so fields which are not specified in the CUE for status
will not be preserved in the API server. This behavior was a bug originally, but if you need to preserve this behavior, you may add
status:
[string]: _
to your CUE schema to keep the x-kubernetes-preserve-unknown-fields: true
in the CRD.
Generated Go Code Breaking Change
Subresources such as status
now use the (exported) CUE field name as their go field name, rather than the name of the type. That means, for a kind called Foo
, the Foo
generated type changes from this:
type Foo struct {
Spec FooSpec `json:"spec"`
FooStatus FooStatus `json:"status"`
}
to this:
type Foo struct {
Spec FooSpec `json:"spec"`
Status FooStatus `json:"status"`
}
References in non-generated code will need to be updated accordingly.
Changelog
- a6fce08 Bump github.com/grafana/grafana-plugin-sdk-go from 0.266.0 to 0.268.1 in /plugin in the all group (#667)
- 3ce6164 Bump github.com/grafana/grafana-plugin-sdk-go from 0.268.1 to 0.269.1 in /plugin in the all group across 1 directory (#684)
- bb605ba Bump the all group across 1 directory with 3 updates (#661)
- a8d05e5 Bump the all group across 1 directory with 3 updates (#663)
- eb008cc Bump the all group across 1 directory with 8 updates (#680)
- 7ef042a Disable revive:use-errors-new linter (#685)
- 122b69a Make operator status fields generation optional and remote status fields type prefixes (#679)
- 4a84edf Update go version to 1.24.0 (#653)