controllers

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package controllers contains a set of controllers for DBaaS

Index

Constants

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

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

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterType added in v0.0.14

type ClusterType string

ClusterType used to understand the underlying platform of k8s cluster.

type DatabaseClusterRestoreReconciler added in v0.1.1

type DatabaseClusterRestoreReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

DatabaseClusterRestoreReconciler reconciles a DatabaseClusterRestore object.

func (*DatabaseClusterRestoreReconciler) Reconcile added in v0.1.1

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 added in v0.1.1

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

SetupWithManager sets up the controller with the Manager.

type DatabaseEngineReconciler added in v0.0.18

type DatabaseEngineReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

DatabaseEngineReconciler reconciles a DatabaseEngine object.

func (*DatabaseEngineReconciler) Reconcile added in v0.0.18

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 added in v0.0.18

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

SetupWithManager sets up the controller with the Manager.

type DatabaseReconciler

type DatabaseReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

DatabaseReconciler reconciles a Database object.

func (*DatabaseReconciler) Reconcile

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

func (*DatabaseReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type Image added in v0.1.4

type Image struct {
	ImagePath string `json:"imagePath"`
	ImageHash string `json:"imageHash"`
	Status    string `json:"status"`
}

Image is contains needed fields to parse information from version service.

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) PSMDBBackupImage added in v0.1.4

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

PSMDBBackupImage returns backup image for psmdb clusters depending on operator version For 1.12+ it gets image from version service.

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 added in v0.1.4

type VersionResponse struct {
	Versions []struct {
		Matrix struct {
			Backup map[string]Image `json:"backup"`
		} `json:"matrix"`
	} `json:"versions"`
}

VersionResponse is a response model for version service response parsing.

Jump to

Keyboard shortcuts

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