multiclusterobservability

package
v0.0.0-...-375b31f Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 55 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteGrafanaOauthClient

func DeleteGrafanaOauthClient(c client.Client) error

func GenerateAPIGatewayRoute

func GenerateAPIGatewayRoute(
	ctx context.Context,
	runclient client.Client, scheme *runtime.Scheme,
	mco *mcov1beta2.MultiClusterObservability) (*ctrl.Result, error)

GenerateAPIGatewayRoute defines aaa

func GenerateAlertmanagerRoute

func GenerateAlertmanagerRoute(
	runclient client.Client, scheme *runtime.Scheme,
	mco *mcov1beta2.MultiClusterObservability) (*ctrl.Result, error)

GenerateAlertmanagerRoute create route for Alertmanager endpoint

func GenerateGrafanaDataSource

func GenerateGrafanaDataSource(
	c client.Client,
	scheme *runtime.Scheme,
	mco *mcov1beta2.MultiClusterObservability) (*ctrl.Result, error)

GenerateGrafanaDataSource is used to generate the GrafanaDatasource as a secret. the GrafanaDatasource points to observatorium api gateway service.

func GenerateGrafanaOauthClient

func GenerateGrafanaOauthClient(
	c client.Client, scheme *runtime.Scheme,
	mco *mcov1beta2.MultiClusterObservability) (*ctrl.Result, error)

func GenerateGrafanaRoute

func GenerateGrafanaRoute(
	c client.Client, scheme *runtime.Scheme,
	mco *mcov1beta2.MultiClusterObservability) (*ctrl.Result, error)

func GenerateObservatoriumCR

func GenerateObservatoriumCR(
	cl client.Client, scheme *runtime.Scheme,
	mco *mcov1beta2.MultiClusterObservability) (*ctrl.Result, error)

GenerateObservatoriumCR returns Observatorium cr defined in MultiClusterObservability

func GenerateProxyRoute

func GenerateProxyRoute(
	runclient client.Client, scheme *runtime.Scheme,
	mco *mcov1beta2.MultiClusterObservability) (*ctrl.Result, error)

GenerateProxyRoute create route for Proxy endpoint

func GetAlertManagerSecretPredicateFunc

func GetAlertManagerSecretPredicateFunc() predicate.Funcs

func GetConfigMapPredicateFunc

func GetConfigMapPredicateFunc() predicate.Funcs

func GetMCHPredicateFunc

func GetMCHPredicateFunc(c client.Client) predicate.Funcs

func GetMCOPredicateFunc

func GetMCOPredicateFunc() predicate.Funcs

func GetNamespacePredicateFunc

func GetNamespacePredicateFunc() predicate.Funcs

func StartStatusUpdate

func StartStatusUpdate(c client.Client, instance *mcov1beta2.MultiClusterObservability)

Start goroutines to update MCO status

Types

type GrafanaDatasource

type GrafanaDatasource struct {
	Access            string          `yaml:"access,omitempty"`
	BasicAuth         bool            `yaml:"basicAuth,omitempty"`
	BasicAuthPassword string          `yaml:"basicAuthPassword,omitempty"`
	BasicAuthUser     string          `yaml:"basicAuthUser,omitempty"`
	Editable          bool            `yaml:"editable,omitempty"`
	IsDefault         bool            `yaml:"isDefault,omitempty"`
	Name              string          `yaml:"name,omitempty"`
	OrgID             int             `yaml:"orgId,omitempty"`
	Type              string          `yaml:"type,omitempty"`
	URL               string          `yaml:"url,omitempty"`
	Version           int             `yaml:"version,omitempty"`
	JSONData          *JsonData       `yaml:"jsonData,omitempty"`
	SecureJSONData    *SecureJsonData `yaml:"secureJsonData,omitempty"`
}

type GrafanaDatasources

type GrafanaDatasources struct {
	APIVersion  int                  `yaml:"apiVersion,omitempty"`
	Datasources []*GrafanaDatasource `yaml:"datasources,omitempty"`
}

type JsonData

type JsonData struct {
	TLSAuth   bool `yaml:"tlsAuth,omitempty"`
	TLSAuthCA bool `yaml:"tlsAuthWithCACert,omitempty"`
	// Timeout is the request timeout in seconds for an HTTP datasource.
	Timeout               string `yaml:"timeout,omitempty"`
	HttpMethod            string `yaml:"httpMethod,omitempty"`
	TimeInterval          string `yaml:"timeInterval,omitempty"`
	CustomQueryParameters string `yaml:"customQueryParameters,omitempty"`
}

type MultiClusterObservabilityReconciler

type MultiClusterObservabilityReconciler struct {
	Manager    manager.Manager
	Client     client.Client
	Log        logr.Logger
	Scheme     *runtime.Scheme
	CRDMap     map[string]bool
	APIReader  client.Reader
	RESTMapper meta.RESTMapper
}

MultiClusterObservabilityReconciler reconciles a MultiClusterObservability object

func (*MultiClusterObservabilityReconciler) HandleStorageSizeChange

HandleStorageSizeChange is used to deal with the storagesize change in CR 1. Directly changed the StatefulSet pvc's size on the pvc itself for 2. Removed StatefulSet and wait for operator to re-create the StatefulSet with the correct size on the claim

func (*MultiClusterObservabilityReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. Modify the Reconcile function to compare the state specified by the MultiClusterObservability 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.golang.ir/sigs.k8s.io/[email protected]/pkg/reconcile In ACM 2.9, we need to ensure that the openshift.io/cluster-monitoring is added to the same namespace as the Multi-cluster Observability Operator to avoid conflicts with the openshift-* namespace when deploying PrometheusRules and ServiceMonitors in ACM.

func (*MultiClusterObservabilityReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type SecureJsonData

type SecureJsonData struct {
	TLSCACert     string `yaml:"tlsCACert,omitempty"`
	TLSClientCert string `yaml:"tlsClientCert,omitempty"`
	TLSClientKey  string `yaml:"tlsClientKey,omitempty"`
}

Jump to

Keyboard shortcuts

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