controllers

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Overview

Package controllers contains a set of controllers for everest

Index

Constants

View Source
const (
	// PerconaXtraDBClusterKind represents pxc kind.
	PerconaXtraDBClusterKind = "PerconaXtraDBCluster"
	// PerconaServerMongoDBKind represents psmdb kind.
	PerconaServerMongoDBKind = "PerconaServerMongoDB"
	// PerconaPGClusterKind represents postgresql kind.
	PerconaPGClusterKind = "PerconaPGCluster"

	// ClusterTypeEKS represents EKS cluster type.
	ClusterTypeEKS ClusterType = "eks"
	// ClusterTypeMinikube represents minikube cluster type.
	ClusterTypeMinikube ClusterType = "minikube"
)

Variables

View Source
var ErrBackupStorageUndefined = errors.New("backup storage is not defined in the upstream DB cluster CR")

ErrBackupStorageUndefined is returned when a backup storage is not defined in the corresponding upstream DB cluster CR.

Functions

This section is empty.

Types

type BackupStorageReconciler added in v0.6.0

type BackupStorageReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

BackupStorageReconciler reconciles a BackupStorage object.

func (*BackupStorageReconciler) Reconcile added in v0.6.0

func (r *BackupStorageReconciler) 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 DatabaseClusterBackup 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.14.1/pkg/reconcile

func (*BackupStorageReconciler) SetupWithManager added in v0.6.0

func (r *BackupStorageReconciler) SetupWithManager(mgr ctrl.Manager, systemNamespace string) error

SetupWithManager sets up the controller with the Manager.

type ClusterType

type ClusterType string

ClusterType used to understand the underlying platform of k8s cluster.

type DatabaseClusterBackupReconciler

type DatabaseClusterBackupReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

DatabaseClusterBackupReconciler reconciles a DatabaseClusterBackup object.

func (*DatabaseClusterBackupReconciler) 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 DatabaseClusterBackup 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.14.1/pkg/reconcile

func (*DatabaseClusterBackupReconciler) SetupWithManager

func (r *DatabaseClusterBackupReconciler) SetupWithManager(mgr ctrl.Manager, systemNamespace string) error

SetupWithManager sets up the controller with the Manager.

type DatabaseClusterReconciler

type DatabaseClusterReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

DatabaseClusterReconciler reconciles a DatabaseCluster object.

func (*DatabaseClusterReconciler) 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. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile

func (*DatabaseClusterReconciler) SetupWithManager

func (r *DatabaseClusterReconciler) SetupWithManager(mgr ctrl.Manager, systemNamespace, monitoringNamespace string) error

SetupWithManager sets up the controller with the Manager.

type DatabaseClusterRestoreReconciler

type DatabaseClusterRestoreReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

DatabaseClusterRestoreReconciler reconciles a DatabaseClusterRestore object.

func (*DatabaseClusterRestoreReconciler) 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.

func (*DatabaseClusterRestoreReconciler) SetupWithManager

func (r *DatabaseClusterRestoreReconciler) SetupWithManager(mgr ctrl.Manager, systemNamespace string) error

SetupWithManager sets up the controller with the Manager.

type DatabaseEngineReconciler

type DatabaseEngineReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

DatabaseEngineReconciler reconciles a DatabaseEngine object.

func (*DatabaseEngineReconciler) 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. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.0/pkg/reconcile

func (*DatabaseEngineReconciler) SetupWithManager

func (r *DatabaseEngineReconciler) SetupWithManager(mgr ctrl.Manager, namespaces []string) error

SetupWithManager sets up the controller with the Manager.

type Matrix

type Matrix struct {
	Backup       map[string]*everestv1alpha1.Component `json:"backup"`
	Mongod       map[string]*everestv1alpha1.Component `json:"mongod"`
	PXC          map[string]*everestv1alpha1.Component `json:"pxc"`
	ProxySQL     map[string]*everestv1alpha1.Component `json:"proxysql"`
	HAProxy      map[string]*everestv1alpha1.Component `json:"haproxy"`
	LogCollector map[string]*everestv1alpha1.Component `json:"logCollector"`
	Postgresql   map[string]*everestv1alpha1.Component `json:"postgresql"`
	PGBackRest   map[string]*everestv1alpha1.Component `json:"pgbackrest"`
	PGBouncer    map[string]*everestv1alpha1.Component `json:"pgbouncer"`
}

Matrix represents the response from the version service.

type MonitoringConfigReconciler added in v0.6.0

type MonitoringConfigReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

MonitoringConfigReconciler reconciles a MonitoringConfig object.

func (*MonitoringConfigReconciler) Reconcile added in v0.6.0

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 DatabaseClusterBackup 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.14.1/pkg/reconcile

func (*MonitoringConfigReconciler) SetupWithManager added in v0.6.0

func (r *MonitoringConfigReconciler) SetupWithManager(mgr ctrl.Manager, monitoringNamespace string) error

SetupWithManager sets up the controller with the Manager.

type PGConfigParser added in v0.0.10

type PGConfigParser struct {
	// contains filtered or unexported fields
}

PGConfigParser represents a parser for PG config.

func NewPGConfigParser added in v0.0.10

func NewPGConfigParser(config string) *PGConfigParser

NewPGConfigParser returns a new parser for PG config.

func (*PGConfigParser) ParsePGConfig added in v0.0.10

func (p *PGConfigParser) ParsePGConfig() (map[string]any, error)

ParsePGConfig parses a PG config file.

type SecretReconciler added in v0.6.0

type SecretReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

SecretReconciler reconciles a Secret object.

func (*SecretReconciler) Reconcile added in v0.6.0

func (r *SecretReconciler) 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 DatabaseClusterBackup 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.14.1/pkg/reconcile

func (*SecretReconciler) SetupWithManager added in v0.6.0

func (r *SecretReconciler) SetupWithManager(mgr ctrl.Manager, systemNamespace string) error

SetupWithManager sets up the controller with the Manager.

type Version

type Version struct {
	// contains filtered or unexported fields
}

Version is a wrapper around github.com/hashicorp/go-version that adds additional functions for developer's usability.

func NewVersion

func NewVersion(v string) (*Version, error)

NewVersion creates a new version from given string.

func (*Version) String

func (v *Version) String() string

String returns version string.

func (*Version) ToAPIVersion

func (v *Version) ToAPIVersion(apiRoot string) string

ToAPIVersion returns version that can be used as K8s APIVersion parameter.

func (*Version) ToCRVersion

func (v *Version) ToCRVersion() string

ToCRVersion returns version usable as CRversion parameter.

func (*Version) ToSemver

func (v *Version) ToSemver() string

ToSemver returns version is semver format.

type VersionResponse

type VersionResponse struct {
	Versions []struct {
		Matrix Matrix `json:"matrix"`
	} `json:"versions"`
}

VersionResponse is a response model for version service response parsing.

type VersionService

type VersionService struct {
	// contains filtered or unexported fields
}

VersionService used for the integration with Percona Version Service.

func NewVersionService

func NewVersionService() *VersionService

NewVersionService creates a version service client.

func (*VersionService) GetVersions

func (v *VersionService) GetVersions(engineType everestv1alpha1.EngineType, operatorVersion string) (*Matrix, error)

GetVersions returns a matrix of available versions for a database engine.

Jump to

Keyboard shortcuts

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