hubofhubs

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 53 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DatabaseReconcileCounter = 0

Functions

func GrafanaDataSource added in v0.7.0

func GrafanaDataSource(databaseURI string, cert []byte) ([]byte, error)

Types

type GlobalHubConditionReconciler added in v0.7.0

type GlobalHubConditionReconciler struct {
	client.Client
	Log logr.Logger
}

this controller is responsible for updating the status of the global hub mgh cr

func (*GlobalHubConditionReconciler) Reconcile added in v0.7.0

func (*GlobalHubConditionReconciler) SetupWithManager added in v0.7.0

func (r *GlobalHubConditionReconciler) SetupWithManager(mgr manager.Manager) error

type GrafanaDatasource added in v0.7.0

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"`
	Database          string          `yaml:"database,omitempty"`
	User              string          `yaml:"user,omitempty"`
	Version           int             `yaml:"version,omitempty"`
	JSONData          *JsonData       `yaml:"jsonData,omitempty"`
	SecureJSONData    *SecureJsonData `yaml:"secureJsonData,omitempty"`
}

type GrafanaDatasources added in v0.7.0

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

type JsonData added in v0.7.0

type JsonData struct {
	SSLMode                string `yaml:"sslmode,omitempty"`
	TLSAuth                bool   `yaml:"tlsAuth,omitempty"`
	TLSAuthWithCACert      bool   `yaml:"tlsAuthWithCACert,omitempty"`
	TLSConfigurationMethod string `yaml:"tlsConfigurationMethod,omitempty"`
	TLSSkipVerify          bool   `yaml:"tlsSkipVerify,omitempty"`
	QueryTimeout           string `yaml:"queryTimeout,omitempty"`
	HttpMethod             string `yaml:"httpMethod,omitempty"`
	TimeInterval           string `yaml:"timeInterval,omitempty"`
}

type MulticlusterGlobalHubReconciler

type MulticlusterGlobalHubReconciler struct {
	manager.Manager
	client.Client
	AddonManager   addonmanager.AddonManager
	KubeClient     kubernetes.Interface
	Scheme         *runtime.Scheme
	LeaderElection *commonobjects.LeaderElectionConfig
	Log            logr.Logger
}

MulticlusterGlobalHubReconciler reconciles a MulticlusterGlobalHub object

func (*MulticlusterGlobalHubReconciler) GenerateGrafanaDataSourceSecret added in v0.7.0

func (r *MulticlusterGlobalHubReconciler) GenerateGrafanaDataSourceSecret(
	ctx context.Context,
	mgh *operatorv1alpha3.MulticlusterGlobalHub,
) (string, error)

GenerateGrafanaDataSource is used to generate the GrafanaDatasource as a secret. the GrafanaDatasource points to multicluster-global-hub cr

func (*MulticlusterGlobalHubReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the MulticlusterGlobalHub 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.11.0/pkg/reconcile

func (*MulticlusterGlobalHubReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type SecureJsonData added in v0.7.0

type SecureJsonData struct {
	Password      string `yaml:"password,omitempty"`
	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