multiclusterobservability

package
v0.0.0-...-009436c Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAPIGatewayRoute

func GenerateAPIGatewayRoute(
	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 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 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"`
	QueryTimeout string `yaml:"queryTimeout,omitempty"`
	HttpMethod   string `yaml:"httpMethod,omitempty"`
	TimeInterval string `yaml:"timeInterval,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.go.dev/sigs.k8s.io/controller-runtime@v0.7.0/pkg/reconcile

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