Documentation ¶
Index ¶
- func DeleteGrafanaOauthClient(c client.Client) error
- func GenerateAPIGatewayRoute(ctx context.Context, runclient client.Client, scheme *runtime.Scheme, ...) (*ctrl.Result, error)
- func GenerateAlertmanagerRoute(runclient client.Client, scheme *runtime.Scheme, ...) (*ctrl.Result, error)
- func GenerateGrafanaDataSource(c client.Client, scheme *runtime.Scheme, ...) (*ctrl.Result, error)
- func GenerateGrafanaOauthClient(c client.Client, scheme *runtime.Scheme, ...) (*ctrl.Result, error)
- func GenerateGrafanaRoute(c client.Client, scheme *runtime.Scheme, ...) (*ctrl.Result, error)
- func GenerateObservatoriumCR(cl client.Client, scheme *runtime.Scheme, ...) (*ctrl.Result, error)
- func GenerateProxyRoute(runclient client.Client, scheme *runtime.Scheme, ...) (*ctrl.Result, error)
- func GetAlertManagerSecretPredicateFunc() predicate.Funcs
- func GetConfigMapPredicateFunc() predicate.Funcs
- func GetMCHPredicateFunc(c client.Client) predicate.Funcs
- func GetMCOPredicateFunc() predicate.Funcs
- func GetNamespacePredicateFunc() predicate.Funcs
- func StartStatusUpdate(c client.Client, instance *mcov1beta2.MultiClusterObservability)
- type GrafanaDatasource
- type GrafanaDatasources
- type JsonData
- type MultiClusterObservabilityReconciler
- func (r *MultiClusterObservabilityReconciler) HandleStorageSizeChange(mco *mcov1beta2.MultiClusterObservability) (*reconcile.Result, error)
- func (r *MultiClusterObservabilityReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *MultiClusterObservabilityReconciler) SetupWithManager(mgr ctrl.Manager) error
- type SecureJsonData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 GetMCOPredicateFunc ¶
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 ¶
func (r *MultiClusterObservabilityReconciler) HandleStorageSizeChange( mco *mcov1beta2.MultiClusterObservability) (*reconcile.Result, error)
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 ¶
func (r *MultiClusterObservabilityReconciler) 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. 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.