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
- 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) (bool, 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(mgr ctrl.Manager, ctx context.Context) 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, ctx context.Context) 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, ctx context.Context) error
- type GrafanaLibraryPanelReconciler
- type GrafanaMuteTimingReconciler
- type GrafanaNotificationPolicyReconciler
- type GrafanaNotificationTemplateReconciler
- type GrafanaReconciler
Constants ¶
const (
RequeueDelay = 10 * time.Second
)
Variables ¶
var ErrLoopDetected = errors.New("loop detected")
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
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) Reconcile ¶ added in v5.9.0
func (r *GrafanaContactPointReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the GrafanaContactPoint object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile
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) (bool, 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 ¶
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) Reconcile ¶
func (r *GrafanaFolderReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the GrafanaFolder object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.9.2/pkg/reconcile
func (*GrafanaFolderReconciler) SetupWithManager ¶
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(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
Discovery discovery.DiscoveryInterface
IsOpenShift bool
ClusterDomain string
}
GrafanaReconciler reconciles a Grafana object
func (*GrafanaReconciler) SetupWithManager ¶
func (r *GrafanaReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Source Files
¶
- controller_shared.go
- dashboard_controller.go
- datasource_controller.go
- grafana_controller.go
- grafanaalertrulegroup_controller.go
- grafanacontactpoint_controller.go
- grafanafolder_controller.go
- grafanamutetiming_controller.go
- grafananotificationtemplate_controller.go
- librarypanel_controller.go
- notificationpolicy_controller.go