Documentation
¶
Index ¶
- type DataMigration
- func (d *DataMigration) ExistingPVTakeOverPrerequisites(ctx context.Context, log logr.Logger) (bool, []*corev1.PersistentVolume, []*corev1.PersistentVolumeClaim, error)
- func (d *DataMigration) FinalizeExistingPVTakeOver(ctx context.Context, log logr.Logger, pvs []*corev1.PersistentVolume) error
- func (d *DataMigration) PrepareExistingPVTakeOver(ctx context.Context, log logr.Logger, pvs []*corev1.PersistentVolume, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataMigration ¶
type DataMigration struct {
// Client is the client.
Client client.Client
// Namespace is the namespace.
Namespace string
// StorageCapacity is the storage capacity of the disk.
StorageCapacity resource.Quantity
// FullName is the full name of the component (e.g., prometheus-<name> or alertmanager-<name>).
FullName string
// OldSubPath is the subpath of the database on the old persistent volume. prometheus-operator assumes a subpath
// `prometheus-db`, hence, if it was different before, it needs to be migrated.
// If this field is not specified, the old subpath is assumed to be `prometheus-`.
OldSubPath *string
// ImageAlpine defines the container image of alpine.
ImageAlpine string
// StatefulSetName is the name of the old StatefulSet.
StatefulSetName string
// PVCNames is the list of names of the old PersistentVolumeClaims.
PVCNames []string
}
DataMigration is a struct for migrating data from existing disks.
func (*DataMigration) ExistingPVTakeOverPrerequisites ¶
func (d *DataMigration) ExistingPVTakeOverPrerequisites(ctx context.Context, log logr.Logger) (bool, []*corev1.PersistentVolume, []*corev1.PersistentVolumeClaim, error)
ExistingPVTakeOverPrerequisites performs the PV take over prerequisites.
func (*DataMigration) FinalizeExistingPVTakeOver ¶
func (d *DataMigration) FinalizeExistingPVTakeOver(ctx context.Context, log logr.Logger, pvs []*corev1.PersistentVolume) error
FinalizeExistingPVTakeOver finalizes the PV take over.
func (*DataMigration) PrepareExistingPVTakeOver ¶
func (d *DataMigration) PrepareExistingPVTakeOver(ctx context.Context, log logr.Logger, pvs []*corev1.PersistentVolume, oldPVCs []*corev1.PersistentVolumeClaim) error
PrepareExistingPVTakeOver prepares the PV take over.
Click to show internal directories.
Click to hide internal directories.