controllers

package
v5.19.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 52 Imported by: 1

Documentation

Index

Constants

View Source
const (
	RequeueDelay = 10 * time.Second
)

Variables

View Source
var ErrLoopDetected = errors.New("loop detected")
View Source
var ErrNoMatchingInstances = fmt.Errorf("no matching instances")

Functions

func GetScopedMatchingInstances added in v5.16.0

func GetScopedMatchingInstances(ctx context.Context, k8sClient client.Client, cr v1beta1.CommonResource) ([]v1beta1.Grafana, error)

Only matching instances in the scope of the resource are returned Resources with allowCrossNamespaceImport expands the scope to the entire cluster Intended to be used in reconciler functions

func ReconcilePlugins

func ReconcilePlugins(ctx context.Context, k8sClient client.Client, scheme *runtime.Scheme, grafana *v1beta1.Grafana, plugins v1beta1.PluginList, resource string) error

TODO Refactor to use scheme from k8sClient.Scheme() as it's the same anyways

func UpdateStatus added in v5.18.0

func UpdateStatus(ctx context.Context, cl client.Client, cr v1beta1.CommonResource)

Types

type GrafanaAlertRuleGroupReconciler added in v5.7.0

type GrafanaAlertRuleGroupReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

GrafanaAlertRuleGroupReconciler reconciles a GrafanaAlertRuleGroup object

func (*GrafanaAlertRuleGroupReconciler) Reconcile added in v5.7.0

func (*GrafanaAlertRuleGroupReconciler) SetupWithManager added in v5.7.0

func (r *GrafanaAlertRuleGroupReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type GrafanaContactPointReconciler added in v5.9.0

type GrafanaContactPointReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

GrafanaContactPointReconciler reconciles a GrafanaContactPoint object

func (*GrafanaContactPointReconciler) Reconcile added in v5.9.0

func (*GrafanaContactPointReconciler) SetupWithManager added in v5.9.0

func (r *GrafanaContactPointReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type GrafanaDashboardReconciler

type GrafanaDashboardReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

GrafanaDashboardReconciler reconciles a GrafanaDashboard object

func (*GrafanaDashboardReconciler) DeleteFolderIfEmpty

func (r *GrafanaDashboardReconciler) DeleteFolderIfEmpty(client *genapi.GrafanaHTTPAPI, folderUID string) (http.Response, error)

func (*GrafanaDashboardReconciler) Exists

func (r *GrafanaDashboardReconciler) Exists(client *genapi.GrafanaHTTPAPI, uid string, title string, folderUID string) (string, error)

func (*GrafanaDashboardReconciler) GetFolderUID added in v5.8.0

func (r *GrafanaDashboardReconciler) GetFolderUID(
	client *genapi.GrafanaHTTPAPI,
	title string,
) (bool, string, error)

func (*GrafanaDashboardReconciler) GetOrCreateFolder

func (*GrafanaDashboardReconciler) Reconcile

func (*GrafanaDashboardReconciler) SetupWithManager

func (r *GrafanaDashboardReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*GrafanaDashboardReconciler) UpdateHomeDashboard

func (r *GrafanaDashboardReconciler) UpdateHomeDashboard(ctx context.Context, grafana v1beta1.Grafana, uid string, dashboard *v1beta1.GrafanaDashboard) error

type GrafanaDatasourceReconciler

type GrafanaDatasourceReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

GrafanaDatasourceReconciler reconciles a GrafanaDatasource object

func (*GrafanaDatasourceReconciler) Exists

func (r *GrafanaDatasourceReconciler) Exists(client *genapi.GrafanaHTTPAPI, uid, name string) (bool, string, error)

func (*GrafanaDatasourceReconciler) Reconcile

func (*GrafanaDatasourceReconciler) SetupWithManager

func (r *GrafanaDatasourceReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type GrafanaFolderReconciler

type GrafanaFolderReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

GrafanaFolderReconciler reconciles a GrafanaFolder object

func (*GrafanaFolderReconciler) Exists

Check if the folder exists. Matches UID first and fall back to title. Title matching only works for non-nested folders

func (*GrafanaFolderReconciler) Reconcile

func (r *GrafanaFolderReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*GrafanaFolderReconciler) SetupWithManager

func (r *GrafanaFolderReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type GrafanaLibraryPanelReconciler added in v5.17.0

type GrafanaLibraryPanelReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

GrafanaLibraryPanelReconciler reconciles a GrafanaLibraryPanel object

func (*GrafanaLibraryPanelReconciler) Reconcile added in v5.17.0

func (*GrafanaLibraryPanelReconciler) SetupWithManager added in v5.17.0

func (r *GrafanaLibraryPanelReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type GrafanaMuteTimingReconciler added in v5.17.0

type GrafanaMuteTimingReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

GrafanaMuteTimingReconciler reconciles a GrafanaMuteTiming object

func (*GrafanaMuteTimingReconciler) Reconcile added in v5.17.0

func (*GrafanaMuteTimingReconciler) SetupWithManager added in v5.17.0

func (r *GrafanaMuteTimingReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type GrafanaNotificationPolicyReconciler added in v5.12.0

type GrafanaNotificationPolicyReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

GrafanaNotificationPolicyReconciler reconciles a GrafanaNotificationPolicy object

func (*GrafanaNotificationPolicyReconciler) Reconcile added in v5.12.0

func (*GrafanaNotificationPolicyReconciler) SetupWithManager added in v5.12.0

func (r *GrafanaNotificationPolicyReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type GrafanaNotificationTemplateReconciler added in v5.16.0

type GrafanaNotificationTemplateReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

GrafanaNotificationTemplateReconciler reconciles a GrafanaNotificationTemplate object

func (*GrafanaNotificationTemplateReconciler) Reconcile added in v5.16.0

func (*GrafanaNotificationTemplateReconciler) SetupWithManager added in v5.16.0

func (r *GrafanaNotificationTemplateReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type GrafanaReconciler

type GrafanaReconciler struct {
	client.Client
	Scheme        *runtime.Scheme
	IsOpenShift   bool
	ClusterDomain string
}

GrafanaReconciler reconciles a Grafana object

func (*GrafanaReconciler) Reconcile

func (r *GrafanaReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*GrafanaReconciler) SetupWithManager

func (r *GrafanaReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Directories

Path Synopsis
Package autodetect is for auto-detecting traits from the environment (platform, APIs, ...).
Package autodetect is for auto-detecting traits from the environment (platform, APIs, ...).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL