Documentation ¶
Index ¶
- type Client
- type GrafanaDatasourceResponse
- type PrometheusReconciler
- func (r *PrometheusReconciler) CleanupPreset(cm kmapi.ClusterManager, p *monitoringv1.Prometheus, isDefault bool) error
- func (r *PrometheusReconciler) CreateClusterPreset(presetBytes []byte) error
- func (r *PrometheusReconciler) CreateGrafanaAppBinding(prom *monitoringv1.Prometheus, resp *GrafanaDatasourceResponse) error
- func (r *PrometheusReconciler) CreatePreset(cm kmapi.ClusterManager, p *monitoringv1.Prometheus, isDefault bool) error
- func (r *PrometheusReconciler) CreateProjectPreset(p *monitoringv1.Prometheus, presetBytes []byte) error
- func (r *PrometheusReconciler) CreatePrometheusAppBinding(prom *monitoringv1.Prometheus, svc *core.Service) (kutil.VerbType, error)
- func (r *PrometheusReconciler) GeneratePresetForPrometheus(p monitoringv1.Prometheus) mona.MonitoringPresets
- func (r *PrometheusReconciler) IsDefault(cm kmapi.ClusterManager, gvk schema.GroupVersionKind, key types.NamespacedName) (bool, error)
- func (r *PrometheusReconciler) NamespaceForProjectSettings(prom *monitoringv1.Prometheus) (ns string, projectId string, err error)
- func (r *PrometheusReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *PrometheusReconciler) SetupClusterForPrometheus(cm kmapi.ClusterManager, prom *monitoringv1.Prometheus, isDefault bool) error
- func (r *PrometheusReconciler) SetupWithManager(mgr ctrl.Manager) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Register ¶
func (c *Client) Register(ctx mona.PrometheusContext, cfg mona.PrometheusConfig) (*GrafanaDatasourceResponse, error)
func (*Client) Unregister ¶
func (c *Client) Unregister(ctx mona.PrometheusContext) error
type GrafanaDatasourceResponse ¶
type GrafanaDatasourceResponse struct { Grafana mona.GrafanaConfig `json:"grafana"` mona.GrafanaContext `json:",inline,omitempty"` }
type PrometheusReconciler ¶
type PrometheusReconciler struct {
// contains filtered or unexported fields
}
PrometheusReconciler reconciles a Prometheus object
func NewReconciler ¶
func NewReconciler(kc client.Client, bc *Client, clusterUID string) *PrometheusReconciler
func (*PrometheusReconciler) CleanupPreset ¶ added in v0.0.4
func (r *PrometheusReconciler) CleanupPreset(cm kmapi.ClusterManager, p *monitoringv1.Prometheus, isDefault bool) error
func (*PrometheusReconciler) CreateClusterPreset ¶
func (r *PrometheusReconciler) CreateClusterPreset(presetBytes []byte) error
func (*PrometheusReconciler) CreateGrafanaAppBinding ¶
func (r *PrometheusReconciler) CreateGrafanaAppBinding(prom *monitoringv1.Prometheus, resp *GrafanaDatasourceResponse) error
func (*PrometheusReconciler) CreatePreset ¶
func (r *PrometheusReconciler) CreatePreset(cm kmapi.ClusterManager, p *monitoringv1.Prometheus, isDefault bool) error
func (*PrometheusReconciler) CreateProjectPreset ¶
func (r *PrometheusReconciler) CreateProjectPreset(p *monitoringv1.Prometheus, presetBytes []byte) error
func (*PrometheusReconciler) CreatePrometheusAppBinding ¶
func (r *PrometheusReconciler) CreatePrometheusAppBinding(prom *monitoringv1.Prometheus, svc *core.Service) (kutil.VerbType, error)
func (*PrometheusReconciler) GeneratePresetForPrometheus ¶
func (r *PrometheusReconciler) GeneratePresetForPrometheus(p monitoringv1.Prometheus) mona.MonitoringPresets
func (*PrometheusReconciler) IsDefault ¶ added in v0.0.4
func (r *PrometheusReconciler) IsDefault(cm kmapi.ClusterManager, gvk schema.GroupVersionKind, key types.NamespacedName) (bool, error)
func (*PrometheusReconciler) NamespaceForProjectSettings ¶ added in v0.0.4
func (r *PrometheusReconciler) NamespaceForProjectSettings(prom *monitoringv1.Prometheus) (ns string, projectId string, err error)
func (*PrometheusReconciler) Reconcile ¶
func (r *PrometheusReconciler) 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 Prometheus 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.16.0/pkg/reconcile
func (*PrometheusReconciler) SetupClusterForPrometheus ¶
func (r *PrometheusReconciler) SetupClusterForPrometheus(cm kmapi.ClusterManager, prom *monitoringv1.Prometheus, isDefault bool) error
func (*PrometheusReconciler) SetupWithManager ¶
func (r *PrometheusReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Click to show internal directories.
Click to hide internal directories.