controllers

package
v5.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 48 Imported by: 1

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func GetMatchingInstances

func GetMatchingInstances(ctx context.Context, k8sClient client.Client, labelSelector *metav1.LabelSelector) (v1beta1.GrafanaList, error)

func ReconcilePlugins

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

Types

type GrafanaAlertRuleGroupReconciler added in v5.7.0

type GrafanaAlertRuleGroupReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

GrafanaAlertRuleGroupReconciler reconciles a GrafanaAlertRuleGroup object

func (*GrafanaAlertRuleGroupReconciler) GetMatchingInstances added in v5.7.0

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
	Log    logr.Logger
	Scheme *runtime.Scheme
}

GrafanaContactPointReconciler reconciles a GrafanaContactPoint object

func (*GrafanaContactPointReconciler) GetMatchingInstances added in v5.9.0

func (r *GrafanaContactPointReconciler) GetMatchingInstances(ctx context.Context, contactPoint *grafanav1beta1.GrafanaContactPoint, k8sClient client.Client) ([]grafanav1beta1.Grafana, error)

func (*GrafanaContactPointReconciler) Reconcile added in v5.9.0

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

type GrafanaDashboardReconciler struct {
	Client    client.Client
	Log       logr.Logger
	Scheme    *runtime.Scheme
	Discovery discovery.DiscoveryInterface
}

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) GetMatchingDashboardInstances

func (r *GrafanaDashboardReconciler) GetMatchingDashboardInstances(ctx context.Context, dashboard *v1beta1.GrafanaDashboard, k8sClient client.Client) (v1beta1.GrafanaList, error)

func (*GrafanaDashboardReconciler) GetOrCreateFolder

func (*GrafanaDashboardReconciler) Reconcile

func (*GrafanaDashboardReconciler) SetupWithManager

func (r *GrafanaDashboardReconciler) SetupWithManager(mgr ctrl.Manager, ctx context.Context) 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
	Log    logr.Logger
}

GrafanaDatasourceReconciler reconciles a GrafanaDatasource object

func (*GrafanaDatasourceReconciler) Exists

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

func (*GrafanaDatasourceReconciler) GetMatchingDatasourceInstances

func (r *GrafanaDatasourceReconciler) GetMatchingDatasourceInstances(ctx context.Context, datasource *v1beta1.GrafanaDatasource, k8sClient client.Client) (v1beta1.GrafanaList, error)

func (*GrafanaDatasourceReconciler) Reconcile

func (*GrafanaDatasourceReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type GrafanaFolderReconciler

type GrafanaFolderReconciler struct {
	client.Client
	Log    logr.Logger
	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) GetMatchingFolderInstances

func (r *GrafanaFolderReconciler) GetMatchingFolderInstances(ctx context.Context, folder *grafanav1beta1.GrafanaFolder, k8sClient client.Client) (grafanav1beta1.GrafanaList, error)

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

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

SetupWithManager sets up the controller with the Manager.

func (*GrafanaFolderReconciler) UpdateStatus

type GrafanaNotificationPolicyReconciler added in v5.12.0

type GrafanaNotificationPolicyReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

GrafanaNotificationPolicyReconciler reconciles a GrafanaNotificationPolicy object

func (*GrafanaNotificationPolicyReconciler) Reconcile added in v5.12.0

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 GrafanaNotifictionPolicy 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 (*GrafanaNotificationPolicyReconciler) SetupWithManager added in v5.12.0

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

SetupWithManager sets up the controller with the Manager.

type GrafanaReconciler

type GrafanaReconciler struct {
	client.Client
	Log         logr.Logger
	Scheme      *runtime.Scheme
	Discovery   discovery.DiscoveryInterface
	IsOpenShift bool
}

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(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