Releases: grafana/grafana-app-sdk
v0.48.0
What Changed in this Release
CRD generation from the grafana-app-sdk generate
command has been updated to abide by kubernetes' structural schema requirements for CRDs with respect to use of anyOf
, oneOf
, and allOf
. CRDs generated from CUE schemas with disjunctions will now use a unified set of the disjunction schemas as the properties
, and only use oneOf
to clarify required (or should-not-be-present) fields. Use of anyOf
for disjunctions has been replaced with oneOf
, to better match the behavior of the CUE OpenAPI serializer.
An optional resource.ClientGenerator
can now be passed in the simple.AppConfig
to allow customizing the ClientGenerator
used by the app's informers. If not provided in the config, it will continue to default to a k8s.ClientRegistry
instantiated with the kubeconfig and default client config.
Changelog
- e400c04 Bump the all group in /plugin with 2 updates (#1021)
- 4f5efe4 [CRD Generation] Abide by Structural Schema Constrains for
anyOf
,allOf
, andoneOf
(#1018) - 52aae37 [codegen] Upgrade cog to v0.0.44 and regenerate golden test files (#1020)
- b0c2bdd [simple.App] Allow Config to Supply a ClientGenerator (#1023)
v0.47.0
Changelog
- ba76a4a Bump github.com/grafana/grafana-app-sdk/logging from 0.45.0 to 0.46.0 in the all group (#1004)
- 40a6f7c Bump github.com/grafana/grafana-plugin-sdk-go from 0.279.0 to 0.280.0 in /plugin in the all group (#1006)
- 9095113 Bump the all group across 1 directory with 2 updates (#1012)
- 85b2b8f Bump the all group in /plugin with 2 updates (#1005)
- aaffce5 K8s: Fix client list return type (#1017)
- 1e13c9e Kind: Support GVK+GVR without pointer reciever (#1009)
- 727aad8 [APIServer/codegen/AppManifest] Allow Referencing Types in Custom Routes (#1013)
- cd6d759 [codegen] Default
make generate
to use the--crdmanifest
flag (#1010)
v0.46.0
What Changed in this Release
This release contains several bugfixes for API servers, including fixes to route naming and conversion, as well as enhancements to informer operation.
Breaking Changes
simple
package changes
ErrorHandler
has moved out of simple.AppInformerConfig
and into the operator.InformerOptions
in simple.AppInformerConfig.InformerOptions
. Example fix:
cfg := simple.AppConfig{
Name: "myapp",
KubeConfig: cfg.KubeConfig,
InformerConfig: simple.AppInformerConfig{
ErrorHandler: func(ctx context.Context, err error) {
logging.FromContext(ctx).With("error", err).Error("Informer processing error")
},
},
ManagedKinds: managedKinds,
}
to
cfg := simple.AppConfig{
Name: "myapp",
KubeConfig: cfg.KubeConfig,
InformerConfig: simple.AppInformerConfig{
InformerOptions: operator.InformerOptions{
ErrorHandler: func(ctx context.Context, err error) {
logging.FromContext(ctx).With("error", err).Error("Informer processing error")
},
},
},
ManagedKinds: managedKinds,
}
simple.InformerSupplier
's signature has changed, from
type InformerSupplier func(
kind resource.Kind, clients resource.ClientGenerator, options operator.ListWatchOptions,
) (operator.Informer, error)
to
type InformerSupplier func(
kind resource.Kind, clients resource.ClientGenerator, options operator.InformerOptions,
) (operator.Informer, error)
operator.ListWatchOptions
can be found in operator.InformerOptions.ListWatchOptions
, this new signature now exposes more config to be passed into the supplier.
Codegen changes
Custom route codegen now automatically produces go types which are compatible with kubernetes' runtime.Object
. This also means that generated custom route responses now contain metav1.TypeMeta
fields, which expose apiVersion
and kind
in their response data. This may break API contracts, so it can be turned off (or can be disabled for any other reason) by adding
responseMetadata: typeMeta: false
alongside your response
in the custom route. See this PR for more details on configuring kubernetes response metadata.
Custom route response go type filenames have also changed from (<kind>_)<routename>_types_gen.go
to (<kind>_)<routename>_response_(object|body)_types_gen.go
. Regenerating code may end up with duplicate types between the file with the old name and the one with the new name. Files with the old naming scheme should be deleted.
Changelog
- bba9b39 Add EventTimeout option and use contextual
cache.ListWatch
methods (#895) - fa67af1 Bump the all group in /plugin with 2 updates (#996)
- 03318a5 Bump the all group with 2 updates (#995)
- dfc817c Update cog to 0.0.41 (#998)
- e50a1e5 [APIServer] Fix conversion handling and PreferredVersion (#1001)
- 4f939f8 [AppManifest] Add apiVersion, kind, metadata, and spec as required fields when calling AsKubeOpenAPI (#1000)
- b394bb9 [codegen/apiserver] Fix Custom Routes Naming (#1003)
- 42a0d05 [codegen] Add Kubernetes Metadata to Custom Route Responses (#983)
- 8806623 [codegen] Prefix custom route go request types (#1002)
v0.45.0
v0.44.0
Changelog
- 7c52e92 Bump github.com/grafana/grafana-app-sdk/logging from 0.43.1 to 0.43.2 in the all group (#989)
- 03bd7ab Bump the all group in /plugin with 2 updates (#990)
- a6d19c7 [apiserver] Custom Resource Routes (#945)
- ee26f97 [apiserver] Support arbitrary subresources in storage (#956)
- ed2d9c1 [codegen] Fix Generated Kind Client Subresource Update (#991)
v0.43.2
Changelog
- 2e959c1 Add health checks to the KubernetesBasedInformer (#977)
- 0e43369 Add pprof endpoints to the metrics server (#974)
- f427040 Bump golang.org/x/tools from 0.36.0 to 0.37.0 in the all group (#985)
- 4f4e6bc Bump the all group across 1 directory with 2 updates (#984)
- beff3ea Bump the all group across 1 directory with 9 updates (#980)
- da4a9dc Function to Auto-Retry of Update Conflicts (#972)
- a4742af Improve monitoring and healthcheck setup for operator apps (#978)
- 9bcdafa Require and use
ResourceVersion
inTypedStore.UpdateSubresource
(#969) - e9143e5 [codegen] Set storage=true on single-version CRDs (#979)
- 0f71f9d [codegen] Upgrade cog to v0.0.40 to fix numeric exclusive OpenAPI constraints (#988)
v0.43.1
Changelog
- 70745d6 Bump github.com/prometheus/client_golang from 1.23.0 to 1.23.1 in the all group (#961)
- 53cc5fc Bump the all group across 1 directory with 6 updates (#958)
- 4c5f3a5 Bump the all group in /plugin with 2 updates (#960)
- 81578d0 Replace the list of finalizers on deletion instead of removing by index (#973)
- 6004cf6 [operator] Improve Finalizer Errors (#968)
v0.43.0
What Changed in this Release
Breaking Change
This release contains a new version of the AppManifest
, v1alpha2
, which is now generated by default from the grafana-app-sdk generate
command. This new version has a schemas
section which contains a full OpenAPI v3 components.schemas
section allowing for more complex OpenAPI schemas to be used for kinds. To continue to generate a v1alpha1
AppManifest
, use --crdmanifest
in your generate
command.
app.ManifestData
has also transitioned to using a full OpenAPI v3 components.schemas
section for its VersionSchema
. VersionSchema.AsMap()
has been removed and replaced with VersionSchema.AsCRDMap()
(for the previous CRD-schema behavior) and VersionSchema.AsOpenAPI3SchemasMap()
(to get the underlying components.schemas
section). The ToManifestData()
functions on v1alpha1.AppManifestSpec
and v1alpha2.AppManifestSpec
should be used for producing correct app.ManifestData
.
Non-Breaking Changes
cog
has been updated tov0.0.39
, which has fixes for go disjunction JSON unmarshaling.- An edge case in
app.MultiRunner
which can cause a panic if one runner errors at the exact time theRun
function is exiting for theMultiRunner
has been fixed. - Dependencies have been updated to the latest available
Changelog
- aa33349 Bump cog to v0.0.39 (#957)
- 295fa50 Bump the all group across 1 directory with 6 updates (#955)
- 21c9ae2 [AppManifest/Codegen] Use Full OpenAPI Schemas Section in AppManifest (#929)
- 045fe75 [MultiRunner] Fix edge case panic in MultiRunner when a runner would error out exactly when the runner was closing the errors channel (#952)
- 66e42e1 k8s.io dependency update fieldpath fix in k8s/apiserver package (#951)
v0.42.0
What Changed in this Release
Breaking Change
The signature of apiserver.NewDefaultInstaller has changed from accepting several resolver functions to a single resolver interface type. This new type is automatically generated in your manifest go file, and should be called GoTypeAssociator. You can pass a pointer to an instance of this type to NewDefaultInstaller as shown in the example apiserver.
Non-breaking changes
The YAML encoder used by the CLI has changed from gopkg.in/yaml.v3
to sigs.k8s.io/yaml
to better match JSON output. This should not impact the actual contents of the generated YAML files, but the spacing used by the kubernetes YAML encoder is different from the gopkg one, so you may see large diffs if you generate YAML.
New Functionality
- The CLI will now generate typed go clients for your kinds, including any custom routes.
- Streaming list is now supported in operators and
k8s.Client
Changelog
- 03752d2 Add support for Streaming ListWatch watch options. (#928)
- 3561d64 Bump github.com/getkin/kin-openapi from 0.132.0 to 0.133.0 in the all group across 1 directory (#934)
- 1fb474d Bump github.com/grafana/grafana-app-sdk/logging from 0.41.0 to 0.41.1 in the all group (#927)
- d9f713a Bump github.com/stretchr/testify from 1.10.0 to 1.11.0 in /plugin in the all group (#933)
- 201ca1a Bump the all group in /plugin with 2 updates (#926)
- 33fca8e [CLI] Switch YAML encoder for CLI to
sigs.k8s.io/yaml
(#925) - b9103db [codegen] Generate Typed Clients for Resources (#890)
v0.24.9
Changelog
- 1dd1315 Bump github.com/prometheus/client_golang from 1.22.0 to 1.23.0 in /plugin in the all group (#897)
- 9452d3b Bump github.com/prometheus/client_golang from 1.22.0 to 1.23.0 in the all group (#899)
- 9cb6622 Bump github.com/stretchr/testify from 1.10.0 to 1.11.0 in /plugin in the all group (#930)
- 5b93d0b Bump golang.org/x/tools from 0.34.0 to 0.35.0 in the all group (#868)
- d2b6848 Bump google.golang.org/grpc from 1.72.0 to 1.72.1 in the all group (#798)
- e5c2014 Bump google.golang.org/grpc from 1.73.0 to 1.74.0 in the all group (#875)
- 8a4cc69 Bump google.golang.org/grpc from 1.74.0 to 1.74.2 in the all group (#885)
- e8ea588 Bump google.golang.org/grpc from 1.74.2 to 1.75.0 in the all group (#923)
- a5d952d Bump the all group across 1 directory with 4 updates (#823)
- 535dcb0 Bump the all group across 1 directory with 5 updates (#847)
- 1b60c19 Bump the all group across 1 directory with 6 updates (#817)
- f7dd4b8 Bump the all group across 1 directory with 6 updates (#916)
- b7083fe Bump the all group across 1 directory with 9 updates (#845)
- d4cd3d7 Bump the all group in /plugin with 2 updates (#801)
- c1cfd4b Bump the all group in /plugin with 2 updates (#814)
- 39c42bf Bump the all group in /plugin with 2 updates (#873)
- b0b7197 Bump the all group in /plugin with 2 updates (#917)
- dddd137 Bump the all group with 2 updates (#862)
- cf895ba Bump the all group with 2 updates (#932)
- 7df3822 Bump the all group with 4 updates (#802)
- 72aa814 Bump the all group with 4 updates (#871)
- aa82b77 Fix dependabot workflow user check to comply with new zizmor guidance. (#921)
- d0e911e [k8s] Allow partial discovery failure for the dynamic patcher (#940)