Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- func GetOrderedFinalizers(cr *api.PerconaServerMongoDB) []string
- func MajorMinor(ver *v.Version) string
- func OwnerRef(ro client.Object, scheme *runtime.Scheme) (metav1.OwnerReference, error)
- func RoundUpGiB(volumeSizeBytes int64) (int64, error)
- type BackupScheduleJob
- type CronRegistry
- type DepVersion
- type MongoClientProvider
- type OperatorVersion
- type ReconcilePerconaServerMongoDB
- type Schedule
- type UpgradeRequest
- type Version
- type VersionMatrix
- type VersionMeta
- type VersionResponse
- type VersionService
- type VersionServiceClient
Constants ¶
const (
GiB = int64(1024 * 1024 * 1024)
)
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new PerconaServerMongoDB Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.
func GetOrderedFinalizers ¶ added in v1.17.0
func GetOrderedFinalizers(cr *api.PerconaServerMongoDB) []string
func MajorMinor ¶ added in v1.8.0
func RoundUpGiB ¶ added in v1.17.0
RoundUpGiB rounds up the volume size in bytes upto multiplications of GiB in the unit of GiB
Types ¶
type BackupScheduleJob ¶ added in v1.13.0
type BackupScheduleJob struct { api.BackupTaskSpec JobID cron.EntryID }
type CronRegistry ¶ added in v1.5.0
type CronRegistry struct {
// contains filtered or unexported fields
}
func NewCronRegistry ¶ added in v1.5.0
func NewCronRegistry() CronRegistry
type DepVersion ¶ added in v1.5.0
type DepVersion struct { MongoImage string `json:"mongoImage,omitempty"` MongoVersion string `json:"mongoVersion,omitempty"` BackupImage string `json:"backupImage,omitempty"` BackupVersion string `json:"backupVersion,omitempty"` PMMImage string `json:"pmmImage,omitempty"` PMMVersion string `json:"pmmVersion,omitempty"` }
type MongoClientProvider ¶ added in v1.15.0
type MongoClientProvider interface { Mongo(ctx context.Context, cr *api.PerconaServerMongoDB, rs *api.ReplsetSpec, role api.SystemUserRole) (mongo.Client, error) Mongos(ctx context.Context, cr *api.PerconaServerMongoDB, role api.SystemUserRole) (mongo.Client, error) Standalone(ctx context.Context, cr *api.PerconaServerMongoDB, role api.SystemUserRole, host string, tlsEnabled bool) (mongo.Client, error) }
type OperatorVersion ¶ added in v1.5.0
type OperatorVersion struct { Operator string `json:"operator"` Database string `json:"database"` Matrix VersionMatrix `json:"matrix"` }
type ReconcilePerconaServerMongoDB ¶
type ReconcilePerconaServerMongoDB struct {
// contains filtered or unexported fields
}
ReconcilePerconaServerMongoDB reconciles a PerconaServerMongoDB object
func (*ReconcilePerconaServerMongoDB) MongoClientProvider ¶ added in v1.15.0
func (r *ReconcilePerconaServerMongoDB) MongoClientProvider() MongoClientProvider
func (*ReconcilePerconaServerMongoDB) Reconcile ¶
func (r *ReconcilePerconaServerMongoDB) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile reads that state of the cluster for a PerconaServerMongoDB object and makes changes based on the state read and what is in the PerconaServerMongoDB.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
type UpgradeRequest ¶ added in v1.8.0
type VersionMatrix ¶ added in v1.5.0
type VersionMeta ¶ added in v1.5.0
type VersionMeta struct { Apply string MongoVersion string KubeVersion string Platform string PMMVersion string BackupVersion string CRUID string Version string ClusterWideEnabled bool HashicorpVaultEnabled bool ShardingEnabled bool PMMEnabled bool HelmDeployOperator bool HelmDeployCR bool SidecarsUsed bool BackupsEnabled bool ClusterSize int32 PITREnabled bool PhysicalBackupScheduled bool }
type VersionResponse ¶ added in v1.5.0
type VersionResponse struct {
Versions []OperatorVersion `json:"versions"`
}
type VersionService ¶ added in v1.5.0
type VersionService interface {
GetExactVersion(cr *api.PerconaServerMongoDB, endpoint string, vm VersionMeta) (DepVersion, error)
}
type VersionServiceClient ¶ added in v1.5.0
type VersionServiceClient struct{}
func (VersionServiceClient) GetExactVersion ¶ added in v1.5.0
func (vs VersionServiceClient) GetExactVersion(cr *api.PerconaServerMongoDB, endpoint string, vm VersionMeta) (DepVersion, error)