Advisor: Remove legacy app register (#113773)

This commit is contained in:
Andres Martinez Gotor
2025-11-14 12:25:30 +01:00
committed by GitHub
parent 4355b3ed0d
commit bfa7ce9d78
14 changed files with 204 additions and 294 deletions
@@ -86,6 +86,11 @@ func New(cfg app.Config, log logging.Logger) (app.Runnable, error) {
func (r *Runner) Run(ctx context.Context) error {
logger := r.log.WithContext(ctx)
if r.stackID == "" && r.orgService == nil {
logger.Debug("Check scheduler disabled")
return nil
}
// We still need the context to eventually be cancelled to exit this function
// but we don't want the requests to fail because of it
ctxWithoutCancel := context.WithoutCancel(ctx)
@@ -64,6 +64,11 @@ func New(cfg app.Config, log logging.Logger) (app.Runnable, error) {
func (r *Runner) Run(ctx context.Context) error {
logger := r.log.WithContext(ctx)
// If stackID is empty and OrgService is nil, do nothing (on-demand registration only)
if r.stackID == "" && r.orgService == nil {
logger.Debug("Auto-registration of checktypes disabled")
return nil
}
// Determine namespaces based on StackID or OrgID
namespaces, err := checks.GetNamespaces(ctx, r.stackID, r.orgService)
@@ -834,17 +834,20 @@ export type CheckSpec = {
[key: string]: string;
};
};
export type CheckstatusOperatorState = {
export type CheckOperatorState = {
/** descriptiveState is an optional more descriptive state field which has no requirements on format */
descriptiveState?: string;
/** details contains any extra information that is operator-specific */
details?: {
[key: string]: object;
[key: string]: {
[key: string]: any;
};
};
/** lastEvaluation is the ResourceVersion last evaluated */
lastEvaluation: string;
/** state describes the state of the lastEvaluation. It is limited to three possible states for machine evaluation. */
state: string;
/** state describes the state of the lastEvaluation.
It is limited to three possible states for machine evaluation. */
state: 'success' | 'in_progress' | 'failed';
};
export type CheckErrorLink = {
/** Human readable error message */
@@ -862,7 +865,7 @@ export type CheckReportFailure = {
/** More information about the failure, not meant to be displayed to the user. Used for LLM suggestions. */
moreInfo?: string;
/** Severity of the failure */
severity: string;
severity: 'high' | 'low';
/** Step ID that the failure is associated with */
stepID: string;
};
@@ -875,23 +878,25 @@ export type CheckReport = {
export type CheckStatus = {
/** additionalFields is reserved for future use */
additionalFields?: {
[key: string]: object;
[key: string]: {
[key: string]: any;
};
};
/** operatorStates is a map of operator ID to operator state evaluations. Any operator which consumes this kind SHOULD add its state evaluation information to this field. */
/** operatorStates is a map of operator ID to operator state evaluations.
Any operator which consumes this kind SHOULD add its state evaluation information to this field. */
operatorStates?: {
[key: string]: CheckstatusOperatorState;
[key: string]: CheckOperatorState;
};
report: CheckReport;
};
export type Check = {
/** APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */
apiVersion?: string;
apiVersion: string;
/** Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */
kind?: string;
kind: string;
metadata: ObjectMeta;
/** Spec is the spec of the Check */
spec: CheckSpec;
status: CheckStatus;
status?: CheckStatus;
};
export type ListMeta = {
/** continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message. */
@@ -966,37 +971,42 @@ export type CheckTypeSpec = {
name: string;
steps: CheckTypeStep[];
};
export type CheckTypestatusOperatorState = {
export type CheckTypeOperatorState = {
/** descriptiveState is an optional more descriptive state field which has no requirements on format */
descriptiveState?: string;
/** details contains any extra information that is operator-specific */
details?: {
[key: string]: object;
[key: string]: {
[key: string]: any;
};
};
/** lastEvaluation is the ResourceVersion last evaluated */
lastEvaluation: string;
/** state describes the state of the lastEvaluation. It is limited to three possible states for machine evaluation. */
state: string;
/** state describes the state of the lastEvaluation.
It is limited to three possible states for machine evaluation. */
state: 'success' | 'in_progress' | 'failed';
};
export type CheckTypeStatus = {
/** additionalFields is reserved for future use */
additionalFields?: {
[key: string]: object;
[key: string]: {
[key: string]: any;
};
};
/** operatorStates is a map of operator ID to operator state evaluations. Any operator which consumes this kind SHOULD add its state evaluation information to this field. */
/** operatorStates is a map of operator ID to operator state evaluations.
Any operator which consumes this kind SHOULD add its state evaluation information to this field. */
operatorStates?: {
[key: string]: CheckTypestatusOperatorState;
[key: string]: CheckTypeOperatorState;
};
};
export type CheckType = {
/** APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */
apiVersion?: string;
apiVersion: string;
/** Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */
kind?: string;
kind: string;
metadata: ObjectMeta;
/** Spec is the spec of the CheckType */
spec: CheckTypeSpec;
status: CheckTypeStatus;
status?: CheckTypeStatus;
};
export type CheckTypeList = {
/** APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */
-4
View File
@@ -1214,10 +1214,6 @@ export interface FeatureToggles {
*/
dashboardTemplates?: boolean;
/**
* Enables Advisor app installer
*/
grafanaAdvisorAppInstaller?: boolean;
/**
* Enables app platform API for annotations
* @default false
*/
-45
View File
@@ -1,45 +0,0 @@
package advisor
import (
"github.com/grafana/grafana-app-sdk/app"
appsdkapiserver "github.com/grafana/grafana-app-sdk/k8s/apiserver"
"github.com/grafana/grafana-app-sdk/simple"
advisorapi "github.com/grafana/grafana/apps/advisor/pkg/apis"
advisorapp "github.com/grafana/grafana/apps/advisor/pkg/app"
"github.com/grafana/grafana/apps/advisor/pkg/app/checkregistry"
"github.com/grafana/grafana/pkg/services/apiserver/appinstaller"
"k8s.io/apiserver/pkg/authorization/authorizer"
"k8s.io/client-go/rest"
)
var (
_ appsdkapiserver.AppInstaller = (*AdvisorAppInstaller)(nil)
_ appinstaller.AuthorizerProvider = (*AdvisorAppInstaller)(nil)
)
type AdvisorAppInstaller struct {
appsdkapiserver.AppInstaller
}
// GetAuthorizer returns the authorizer for the plugins app.
func (a *AdvisorAppInstaller) GetAuthorizer() authorizer.Authorizer {
return advisorapp.GetAuthorizer()
}
func ProvideAppInstaller() (*AdvisorAppInstaller, error) {
provider := simple.NewAppProvider(advisorapi.LocalManifest(), nil, advisorapp.New)
specificConfig := checkregistry.AdvisorAppConfig{}
appConfig := app.Config{
KubeConfig: rest.Config{},
ManifestData: *advisorapi.LocalManifest().ManifestData,
SpecificConfig: specificConfig,
}
installer := &AdvisorAppInstaller{}
i, err := appsdkapiserver.NewDefaultAppInstaller(provider, appConfig, advisorapi.NewGoTypeAssociator())
if err != nil {
return nil, err
}
installer.AppInstaller = i
return installer, nil
}
+31 -17
View File
@@ -2,27 +2,38 @@ package advisor
import (
"github.com/grafana/grafana-app-sdk/app"
appsdkapiserver "github.com/grafana/grafana-app-sdk/k8s/apiserver"
"github.com/grafana/grafana-app-sdk/simple"
"github.com/grafana/grafana/apps/advisor/pkg/apis"
advisorv0alpha1 "github.com/grafana/grafana/apps/advisor/pkg/apis/advisor/v0alpha1"
advisorapi "github.com/grafana/grafana/apps/advisor/pkg/apis"
advisorapp "github.com/grafana/grafana/apps/advisor/pkg/app"
"github.com/grafana/grafana/apps/advisor/pkg/app/checkregistry"
"github.com/grafana/grafana/pkg/services/apiserver/builder"
"github.com/grafana/grafana/pkg/services/apiserver/builder/runner"
"github.com/grafana/grafana/pkg/services/apiserver/appinstaller"
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/setting"
"k8s.io/apiserver/pkg/authorization/authorizer"
"k8s.io/client-go/rest"
)
type AdvisorAppProvider struct {
app.Provider
var (
_ appsdkapiserver.AppInstaller = (*AdvisorAppInstaller)(nil)
_ appinstaller.AuthorizerProvider = (*AdvisorAppInstaller)(nil)
)
type AdvisorAppInstaller struct {
appsdkapiserver.AppInstaller
}
func RegisterApp(
// GetAuthorizer returns the authorizer for the plugins app.
func (a *AdvisorAppInstaller) GetAuthorizer() authorizer.Authorizer {
return advisorapp.GetAuthorizer()
}
func ProvideAppInstaller(
checkRegistry checkregistry.CheckService,
cfg *setting.Cfg,
orgService org.Service,
) *AdvisorAppProvider {
provider := &AdvisorAppProvider{}
) (*AdvisorAppInstaller, error) {
provider := simple.NewAppProvider(advisorapi.LocalManifest(), nil, advisorapp.New)
pluginConfig := cfg.PluginSettings["grafana-advisor-app"]
specificConfig := checkregistry.AdvisorAppConfig{
CheckRegistry: checkRegistry,
@@ -30,13 +41,16 @@ func RegisterApp(
StackID: cfg.StackID,
OrgService: orgService,
}
appCfg := &runner.AppBuilderConfig{
OpenAPIDefGetter: advisorv0alpha1.GetOpenAPIDefinitions,
ManagedKinds: advisorapp.GetKinds(),
Authorizer: advisorapp.GetAuthorizer(),
CustomConfig: any(specificConfig),
AllowedV0Alpha1Resources: []string{builder.AllResourcesAllowed},
appCfg := app.Config{
KubeConfig: rest.Config{},
ManifestData: *advisorapi.LocalManifest().ManifestData,
SpecificConfig: specificConfig,
}
provider.Provider = simple.NewAppProvider(apis.LocalManifest(), appCfg, advisorapp.New)
return provider
installer := &AdvisorAppInstaller{}
i, err := appsdkapiserver.NewDefaultAppInstaller(provider, appCfg, advisorapi.NewGoTypeAssociator())
if err != nil {
return nil, err
}
installer.AppInstaller = i
return installer, nil
}
+1 -9
View File
@@ -2,7 +2,6 @@ package appregistry
import (
"context"
"slices"
"k8s.io/client-go/rest"
@@ -73,7 +72,7 @@ func ProvideAppInstallers(
installers = append(installers, annotationAppInstaller)
}
//nolint:staticcheck // not yet migrated to OpenFeature
if features.IsEnabledGlobally(featuremgmt.FlagGrafanaAdvisor) && features.IsEnabledGlobally(featuremgmt.FlagGrafanaAdvisorAppInstaller) {
if features.IsEnabledGlobally(featuremgmt.FlagGrafanaAdvisor) {
installers = append(installers, advisorAppInstaller)
}
@@ -96,7 +95,6 @@ func ProvideBuilderRunners(
restConfigProvider apiserver.RestConfigProvider,
features featuremgmt.FeatureToggles,
investigationAppProvider *investigations.InvestigationsAppProvider,
advisorAppProvider *advisor.AdvisorAppProvider,
grafanaCfg *setting.Cfg,
) (*Service, error) {
cfgWrapper := func(ctx context.Context) (*rest.Config, error) {
@@ -121,12 +119,6 @@ func ProvideBuilderRunners(
logger.Debug("Investigations backend is enabled")
providers = append(providers, investigationAppProvider)
}
//nolint:staticcheck // not yet migrated to OpenFeature
if features.IsEnabledGlobally(featuremgmt.FlagGrafanaAdvisor) &&
!features.IsEnabledGlobally(featuremgmt.FlagGrafanaAdvisorAppInstaller) &&
!slices.Contains(grafanaCfg.DisablePlugins, "grafana-advisor-app") {
providers = append(providers, advisorAppProvider)
}
apiGroupRunner, err = runner.NewAPIGroupRunner(cfg, providers...)
if err != nil {
-2
View File
@@ -3,7 +3,6 @@ package appregistry
import (
"github.com/google/wire"
"github.com/grafana/grafana/pkg/registry/apps/advisor"
"github.com/grafana/grafana/pkg/registry/apps/alerting/notifications"
"github.com/grafana/grafana/pkg/registry/apps/alerting/rules"
"github.com/grafana/grafana/pkg/registry/apps/annotation"
@@ -21,7 +20,6 @@ var WireSet = wire.NewSet(
ProvideBuilderRunners,
playlist.RegisterAppInstaller,
investigations.RegisterApp,
advisor.RegisterApp,
plugins.RegisterAppInstaller,
shorturl.RegisterAppInstaller,
correlations.RegisterAppInstaller,
+6 -8
View File
@@ -807,7 +807,8 @@ func Initialize(ctx context.Context, cfg *setting.Cfg, opts Options, apiOpts api
if err != nil {
return nil, err
}
advisorAppInstaller, err := advisor2.ProvideAppInstaller()
checkregistryService := checkregistry.ProvideService(service15, pluginstoreService, plugincontextProvider, middlewareHandler, plugincheckerService, repoManager, preinstallImpl, managedpluginsNoop, noop, ssosettingsimplService, cfg, pluginerrsStore)
advisorAppInstaller, err := advisor2.ProvideAppInstaller(checkregistryService, cfg, orgService)
if err != nil {
return nil, err
}
@@ -827,9 +828,7 @@ func Initialize(ctx context.Context, cfg *setting.Cfg, opts Options, apiOpts api
}
zanzanaReconciler := dualwrite2.ProvideZanzanaReconciler(cfg, featureToggles, zanzanaClient, sqlStore, serverLockService, folderimplService)
investigationsAppProvider := investigations.RegisterApp(cfg)
checkregistryService := checkregistry.ProvideService(service15, pluginstoreService, plugincontextProvider, middlewareHandler, plugincheckerService, repoManager, preinstallImpl, managedpluginsNoop, noop, ssosettingsimplService, cfg, pluginerrsStore)
advisorAppProvider := advisor2.RegisterApp(checkregistryService, cfg, orgService)
appregistryService, err := appregistry.ProvideBuilderRunners(apiserverService, eventualRestConfigProvider, featureToggles, investigationsAppProvider, advisorAppProvider, cfg)
appregistryService, err := appregistry.ProvideBuilderRunners(apiserverService, eventualRestConfigProvider, featureToggles, investigationsAppProvider, cfg)
if err != nil {
return nil, err
}
@@ -1449,7 +1448,8 @@ func InitializeForTest(ctx context.Context, t sqlutil.ITestDB, testingT interfac
if err != nil {
return nil, err
}
advisorAppInstaller, err := advisor2.ProvideAppInstaller()
checkregistryService := checkregistry.ProvideService(service15, pluginstoreService, plugincontextProvider, middlewareHandler, plugincheckerService, repoManager, preinstallImpl, managedpluginsNoop, noop, ssosettingsimplService, cfg, pluginerrsStore)
advisorAppInstaller, err := advisor2.ProvideAppInstaller(checkregistryService, cfg, orgService)
if err != nil {
return nil, err
}
@@ -1469,9 +1469,7 @@ func InitializeForTest(ctx context.Context, t sqlutil.ITestDB, testingT interfac
}
zanzanaReconciler := dualwrite2.ProvideZanzanaReconciler(cfg, featureToggles, zanzanaClient, sqlStore, serverLockService, folderimplService)
investigationsAppProvider := investigations.RegisterApp(cfg)
checkregistryService := checkregistry.ProvideService(service15, pluginstoreService, plugincontextProvider, middlewareHandler, plugincheckerService, repoManager, preinstallImpl, managedpluginsNoop, noop, ssosettingsimplService, cfg, pluginerrsStore)
advisorAppProvider := advisor2.RegisterApp(checkregistryService, cfg, orgService)
appregistryService, err := appregistry.ProvideBuilderRunners(apiserverService, eventualRestConfigProvider, featureToggles, investigationsAppProvider, advisorAppProvider, cfg)
appregistryService, err := appregistry.ProvideBuilderRunners(apiserverService, eventualRestConfigProvider, featureToggles, investigationsAppProvider, cfg)
if err != nil {
return nil, err
}
-6
View File
@@ -2107,12 +2107,6 @@ var (
Owner: grafanaSharingSquad,
FrontendOnly: false,
},
{
Name: "grafanaAdvisorAppInstaller",
Description: "Enables Advisor app installer",
Stage: FeatureStageExperimental,
Owner: grafanaPluginsPlatformSquad,
},
{
Name: "kubernetesAnnotations",
Description: "Enables app platform API for annotations",
-1
View File
@@ -270,6 +270,5 @@ newPanelPadding,experimental,@grafana/dashboards-squad,false,false,false
onlyStoreActionSets,GA,@grafana/identity-access-team,false,false,false
panelTimeSettings,experimental,@grafana/dashboards-squad,false,false,false
dashboardTemplates,experimental,@grafana/sharing-squad,false,false,false
grafanaAdvisorAppInstaller,experimental,@grafana/plugins-platform-backend,false,false,false
kubernetesAnnotations,experimental,@grafana/grafana-backend-services-squad,false,false,false
awsDatasourcesHttpProxy,experimental,@grafana/aws-datasources,false,false,false
1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
270 onlyStoreActionSets GA @grafana/identity-access-team false false false
271 panelTimeSettings experimental @grafana/dashboards-squad false false false
272 dashboardTemplates experimental @grafana/sharing-squad false false false
grafanaAdvisorAppInstaller experimental @grafana/plugins-platform-backend false false false
273 kubernetesAnnotations experimental @grafana/grafana-backend-services-squad false false false
274 awsDatasourcesHttpProxy experimental @grafana/aws-datasources false false false
-4
View File
@@ -1090,10 +1090,6 @@ const (
// Enable template dashboards
FlagDashboardTemplates = "dashboardTemplates"
// FlagGrafanaAdvisorAppInstaller
// Enables Advisor app installer
FlagGrafanaAdvisorAppInstaller = "grafanaAdvisorAppInstaller"
// FlagKubernetesAnnotations
// Enables app platform API for annotations
FlagKubernetesAnnotations = "kubernetesAnnotations"
-12
View File
@@ -1840,18 +1840,6 @@
"codeowner": "@grafana/plugins-platform-backend"
}
},
{
"metadata": {
"name": "grafanaAdvisorAppInstaller",
"resourceVersion": "1762790554324",
"creationTimestamp": "2025-11-10T16:02:34Z"
},
"spec": {
"description": "Enables Advisor app installer",
"stage": "experimental",
"codeowner": "@grafana/plugins-platform-backend"
}
},
{
"metadata": {
"name": "grafanaAssistantInProfilesDrilldown",
@@ -2281,9 +2281,10 @@
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.Check": {
"type": "object",
"required": [
"kind",
"apiVersion",
"metadata",
"spec",
"status"
"spec"
],
"properties": {
"apiVersion": {
@@ -2303,21 +2304,10 @@
]
},
"spec": {
"description": "Spec is the spec of the Check",
"default": {},
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckSpec"
}
]
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckSpec"
},
"status": {
"default": {},
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckStatus"
}
]
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckStatus"
}
},
"x-kubernetes-group-version-kind": [
@@ -2337,15 +2327,14 @@
"properties": {
"message": {
"description": "Human readable error message",
"type": "string",
"default": ""
"type": "string"
},
"url": {
"description": "URL to a page with more information about the error",
"type": "string",
"default": ""
"type": "string"
}
}
},
"additionalProperties": false
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckList": {
"type": "object",
@@ -2390,6 +2379,41 @@
}
]
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckOperatorState": {
"type": "object",
"required": [
"lastEvaluation",
"state"
],
"properties": {
"descriptiveState": {
"description": "descriptiveState is an optional more descriptive state field which has no requirements on format",
"type": "string"
},
"details": {
"description": "details contains any extra information that is operator-specific",
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {}
}
},
"lastEvaluation": {
"description": "lastEvaluation is the ResourceVersion last evaluated",
"type": "string"
},
"state": {
"description": "state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.",
"type": "string",
"enum": [
"success",
"in_progress",
"failed"
]
}
},
"additionalProperties": false
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckReport": {
"type": "object",
"required": [
@@ -2399,23 +2423,17 @@
"properties": {
"count": {
"description": "Number of elements analyzed",
"type": "integer",
"format": "int64",
"default": 0
"type": "integer"
},
"failures": {
"description": "List of failures",
"type": "array",
"items": {
"default": {},
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckReportFailure"
}
]
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckReportFailure"
}
}
}
},
"additionalProperties": false
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckReportFailure": {
"type": "object",
@@ -2429,24 +2447,17 @@
"properties": {
"item": {
"description": "Human readable identifier of the item that failed",
"type": "string",
"default": ""
"type": "string"
},
"itemID": {
"description": "ID of the item that failed",
"type": "string",
"default": ""
"type": "string"
},
"links": {
"description": "Links to actions that can be taken to resolve the failure",
"type": "array",
"items": {
"default": {},
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckErrorLink"
}
]
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckErrorLink"
}
},
"moreInfo": {
@@ -2456,14 +2467,17 @@
"severity": {
"description": "Severity of the failure",
"type": "string",
"default": ""
"enum": [
"high",
"low"
]
},
"stepID": {
"description": "Step ID that the failure is associated with",
"type": "string",
"default": ""
"type": "string"
}
}
},
"additionalProperties": false
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckSpec": {
"type": "object",
@@ -2472,11 +2486,11 @@
"description": "Generic data input that a check can receive",
"type": "object",
"additionalProperties": {
"type": "string",
"default": ""
"type": "string"
}
}
}
},
"additionalProperties": false
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckStatus": {
"type": "object",
@@ -2488,37 +2502,30 @@
"description": "additionalFields is reserved for future use",
"type": "object",
"additionalProperties": {
"type": "object"
"type": "object",
"additionalProperties": {}
}
},
"operatorStates": {
"description": "operatorStates is a map of operator ID to operator state evaluations. Any operator which consumes this kind SHOULD add its state evaluation information to this field.",
"description": "operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.",
"type": "object",
"additionalProperties": {
"default": {},
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckstatusOperatorState"
}
]
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckOperatorState"
}
},
"report": {
"default": {},
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckReport"
}
]
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckReport"
}
}
},
"additionalProperties": false
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckType": {
"type": "object",
"required": [
"kind",
"apiVersion",
"metadata",
"spec",
"status"
"spec"
],
"properties": {
"apiVersion": {
@@ -2538,21 +2545,10 @@
]
},
"spec": {
"description": "Spec is the spec of the CheckType",
"default": {},
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckTypeSpec"
}
]
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckTypeSpec"
},
"status": {
"default": {},
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckTypeStatus"
}
]
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckTypeStatus"
}
},
"x-kubernetes-group-version-kind": [
@@ -2606,6 +2602,41 @@
}
]
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckTypeOperatorState": {
"type": "object",
"required": [
"lastEvaluation",
"state"
],
"properties": {
"descriptiveState": {
"description": "descriptiveState is an optional more descriptive state field which has no requirements on format",
"type": "string"
},
"details": {
"description": "details contains any extra information that is operator-specific",
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {}
}
},
"lastEvaluation": {
"description": "lastEvaluation is the ResourceVersion last evaluated",
"type": "string"
},
"state": {
"description": "state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.",
"type": "string",
"enum": [
"success",
"in_progress",
"failed"
]
}
},
"additionalProperties": false
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckTypeSpec": {
"type": "object",
"required": [
@@ -2614,21 +2645,16 @@
],
"properties": {
"name": {
"type": "string",
"default": ""
"type": "string"
},
"steps": {
"type": "array",
"items": {
"default": {},
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckTypeStep"
}
]
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckTypeStep"
}
}
}
},
"additionalProperties": false
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckTypeStatus": {
"type": "object",
@@ -2637,22 +2663,19 @@
"description": "additionalFields is reserved for future use",
"type": "object",
"additionalProperties": {
"type": "object"
"type": "object",
"additionalProperties": {}
}
},
"operatorStates": {
"description": "operatorStates is a map of operator ID to operator state evaluations. Any operator which consumes this kind SHOULD add its state evaluation information to this field.",
"description": "operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.",
"type": "object",
"additionalProperties": {
"default": {},
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckTypestatusOperatorState"
}
]
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckTypeOperatorState"
}
}
}
},
"additionalProperties": false
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckTypeStep": {
"type": "object",
@@ -2664,82 +2687,19 @@
],
"properties": {
"description": {
"type": "string",
"default": ""
"type": "string"
},
"resolution": {
"type": "string",
"default": ""
"type": "string"
},
"stepID": {
"type": "string",
"default": ""
"type": "string"
},
"title": {
"type": "string",
"default": ""
}
}
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckTypestatusOperatorState": {
"type": "object",
"required": [
"lastEvaluation",
"state"
],
"properties": {
"descriptiveState": {
"description": "descriptiveState is an optional more descriptive state field which has no requirements on format",
"type": "string"
},
"details": {
"description": "details contains any extra information that is operator-specific",
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"lastEvaluation": {
"description": "lastEvaluation is the ResourceVersion last evaluated",
"type": "string",
"default": ""
},
"state": {
"description": "state describes the state of the lastEvaluation. It is limited to three possible states for machine evaluation.",
"type": "string",
"default": ""
}
}
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckstatusOperatorState": {
"type": "object",
"required": [
"lastEvaluation",
"state"
],
"properties": {
"descriptiveState": {
"description": "descriptiveState is an optional more descriptive state field which has no requirements on format",
"type": "string"
},
"details": {
"description": "details contains any extra information that is operator-specific",
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"lastEvaluation": {
"description": "lastEvaluation is the ResourceVersion last evaluated",
"type": "string",
"default": ""
},
"state": {
"description": "state describes the state of the lastEvaluation. It is limited to three possible states for machine evaluation.",
"type": "string",
"default": ""
}
}
},
"additionalProperties": false
},
"io.k8s.apimachinery.pkg.apis.meta.v1.APIResource": {
"description": "APIResource specifies the name of a resource and whether it is namespaced.",