Documentation
¶
Index ¶
- Constants
- Variables
- func GetScopedMatchingInstances(ctx context.Context, k8sClient client.Client, cr v1beta1.CommonResource) ([]v1beta1.Grafana, error)
- func ReconcilePlugins(ctx context.Context, k8sClient client.Client, scheme *runtime.Scheme, ...) error
- func UpdateStatus(ctx context.Context, cl client.Client, cr v1beta1.CommonResource)
- type GrafanaAlertRuleGroupReconciler
- type GrafanaContactPointReconciler
- type GrafanaDashboardReconciler
- func (r *GrafanaDashboardReconciler) DeleteFolderIfEmpty(client *genapi.GrafanaHTTPAPI, folderUID string) (http.Response, error)
- func (r *GrafanaDashboardReconciler) Exists(client *genapi.GrafanaHTTPAPI, uid string, title string, folderUID string) (string, error)
- func (r *GrafanaDashboardReconciler) GetFolderUID(client *genapi.GrafanaHTTPAPI, title string) (bool, string, error)
- func (r *GrafanaDashboardReconciler) GetOrCreateFolder(client *genapi.GrafanaHTTPAPI, cr *v1beta1.GrafanaDashboard) (string, error)
- func (r *GrafanaDashboardReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *GrafanaDashboardReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- func (r *GrafanaDashboardReconciler) UpdateHomeDashboard(ctx context.Context, grafana v1beta1.Grafana, uid string, ...) error
- type GrafanaDatasourceReconciler
- func (r *GrafanaDatasourceReconciler) Exists(client *genapi.GrafanaHTTPAPI, uid, name string) (bool, string, error)
- func (r *GrafanaDatasourceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *GrafanaDatasourceReconciler) SetupWithManager(mgr ctrl.Manager) error
- type GrafanaFolderReconciler
- func (r *GrafanaFolderReconciler) Exists(client *genapi.GrafanaHTTPAPI, cr *grafanav1beta1.GrafanaFolder) (bool, string, string, error)
- func (r *GrafanaFolderReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *GrafanaFolderReconciler) SetupWithManager(mgr ctrl.Manager) error
- type GrafanaLibraryPanelReconciler
- type GrafanaMuteTimingReconciler
- type GrafanaNotificationPolicyReconciler
- type GrafanaNotificationTemplateReconciler
- type GrafanaReconciler
Constants ¶
const (
RequeueDelay = 10 * time.Second
)
Variables ¶
var ErrLoopDetected = errors.New("loop detected")
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
Types ¶
type GrafanaAlertRuleGroupReconciler ¶ added in v5.7.0
GrafanaAlertRuleGroupReconciler reconciles a GrafanaAlertRuleGroup object
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
GrafanaContactPointReconciler reconciles a GrafanaContactPoint object
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 ¶
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 (r *GrafanaDashboardReconciler) GetOrCreateFolder(client *genapi.GrafanaHTTPAPI, cr *v1beta1.GrafanaDashboard) (string, error)
func (*GrafanaDashboardReconciler) SetupWithManager ¶
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 ¶
GrafanaDatasourceReconciler reconciles a GrafanaDatasource object
func (*GrafanaDatasourceReconciler) Exists ¶
func (r *GrafanaDatasourceReconciler) Exists(client *genapi.GrafanaHTTPAPI, uid, name string) (bool, string, error)
func (*GrafanaDatasourceReconciler) SetupWithManager ¶
func (r *GrafanaDatasourceReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type GrafanaFolderReconciler ¶
GrafanaFolderReconciler reconciles a GrafanaFolder object
func (*GrafanaFolderReconciler) Exists ¶
func (r *GrafanaFolderReconciler) Exists(client *genapi.GrafanaHTTPAPI, cr *grafanav1beta1.GrafanaFolder) (bool, string, string, error)
Check if the folder exists. Matches UID first and fall back to title. Title matching only works for non-nested folders
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
GrafanaLibraryPanelReconciler reconciles a GrafanaLibraryPanel object
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
GrafanaMuteTimingReconciler reconciles a GrafanaMuteTiming object
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) 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
GrafanaNotificationTemplateReconciler reconciles a GrafanaNotificationTemplate object
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) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.