prometheus

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

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 NewClient

func NewClient(baseURL, token string, caCert []byte) (*Client, error)

func (*Client) CACert added in v0.0.7

func (c *Client) CACert() []byte

func (*Client) Register

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, hubUID, rancherAuthSecretName string, d detector.Detector) *PrometheusReconciler

func (*PrometheusReconciler) CleanupPreset added in v0.0.4

func (r *PrometheusReconciler) CleanupPreset(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(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) 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(ctx context.Context, 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.

Jump to

Keyboard shortcuts

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