Documentation
¶
Index ¶
- Constants
- func IsJobConditionTrue(conditions []batchv1.JobCondition, conditionType batchv1.JobConditionType) bool
- func MakeDiscardJobName(target *mantlev1.MantleBackup) string
- func MakeDiscardPVCName(target *mantlev1.MantleBackup) string
- func MakeDiscardPVName(target *mantlev1.MantleBackup) string
- func MakeExportDataPVCName(target *mantlev1.MantleBackup) string
- func MakeExportJobName(target *mantlev1.MantleBackup) string
- func MakeImportJobName(target *mantlev1.MantleBackup) string
- func MakeObjectNameOfExportedData(name, uid string) string
- func MakeUploadJobName(target *mantlev1.MantleBackup) string
- type GarbageCollectorRunner
- type MantleBackupConfigReconciler
- type MantleBackupReconciler
- type MantleRestoreReconciler
- type MantleRestoreReconcilerE2E
- type ObjectStorageSettings
- type PersistentVolumeReconciler
- type PersistentVolumeReconcilerE2E
- type PrimarySettings
- type ProxySettings
- type SecondaryServer
- func (s *SecondaryServer) CreateOrUpdateMantleBackup(ctx context.Context, req *proto.CreateOrUpdateMantleBackupRequest) (*proto.CreateOrUpdateMantleBackupResponse, error)
- func (s *SecondaryServer) CreateOrUpdatePVC(ctx context.Context, req *proto.CreateOrUpdatePVCRequest) (*proto.CreateOrUpdatePVCResponse, error)
- func (s *SecondaryServer) ListMantleBackup(ctx context.Context, req *proto.ListMantleBackupRequest) (*proto.ListMantleBackupResponse, error)
- func (s *SecondaryServer) SetSynchronizing(ctx context.Context, req *proto.SetSynchronizingRequest) (*proto.SetSynchronizingResponse, error)
Constants ¶
const ( MantleBackupFinalizerName = "mantlebackup.mantle.cybozu.io/finalizer" MantleExportJobPrefix = "mantle-export-" MantleUploadJobPrefix = "mantle-upload-" MantleExportDataPVCPrefix = "mantle-export-" MantleImportJobPrefix = "mantle-import-" MantleDiscardJobPrefix = "mantle-discard-" MantleDiscardPVCPrefix = "mantle-discard-" MantleDiscardPVPrefix = "mantle-discard-" )
const ( MantleBackupConfigFinalizerName = "mantlebackupconfig.mantle.cybozu.io/finalizer" MantleBackupConfigCronJobNamePrefix = "mbc-" )
const ( MantleRestoreFinalizerName = "mantlerestore.mantle.cybozu.io/finalizer" RestoringPVFinalizerName = "mantle.cybozu.io/restoring-pv-finalizer" PVAnnotationRestoredBy = "mantle.cybozu.io/restored-by" PVAnnotationRestoredByName = "mantle.cybozu.io/restored-by-name" PVAnnotationRestoredByNamespace = "mantle.cybozu.io/restored-by-namespace" PVCAnnotationRestoredBy = "mantle.cybozu.io/restored-by" )
const ( RoleStandalone = "standalone" RolePrimary = "primary" RoleSecondary = "secondary" )
Variables ¶
This section is empty.
Functions ¶
func IsJobConditionTrue ¶ added in v0.2.0
func IsJobConditionTrue(conditions []batchv1.JobCondition, conditionType batchv1.JobConditionType) bool
IsJobConditionTrue returns true when the conditionType is present and set to `metav1.ConditionTrue`. Otherwise, it returns false. Note that we can't use meta.IsStatusConditionTrue because it doesn't accept []JobCondition.
func MakeDiscardJobName ¶ added in v0.3.1
func MakeDiscardJobName(target *mantlev1.MantleBackup) string
func MakeDiscardPVCName ¶ added in v0.3.1
func MakeDiscardPVCName(target *mantlev1.MantleBackup) string
func MakeDiscardPVName ¶ added in v0.3.1
func MakeDiscardPVName(target *mantlev1.MantleBackup) string
func MakeExportDataPVCName ¶ added in v0.3.1
func MakeExportDataPVCName(target *mantlev1.MantleBackup) string
func MakeExportJobName ¶ added in v0.3.1
func MakeExportJobName(target *mantlev1.MantleBackup) string
func MakeImportJobName ¶ added in v0.3.1
func MakeImportJobName(target *mantlev1.MantleBackup) string
func MakeObjectNameOfExportedData ¶ added in v0.3.1
func MakeUploadJobName ¶ added in v0.3.1
func MakeUploadJobName(target *mantlev1.MantleBackup) string
Types ¶
type GarbageCollectorRunner ¶ added in v0.2.0
type GarbageCollectorRunner struct {
// contains filtered or unexported fields
}
func NewGarbageCollectorRunner ¶ added in v0.2.0
type MantleBackupConfigReconciler ¶ added in v0.2.0
type MantleBackupConfigReconciler struct { Client client.Client Scheme *runtime.Scheme // contains filtered or unexported fields }
MantleBackupConfigReconciler reconciles a MantleBackupConfig object
func NewMantleBackupConfigReconciler ¶ added in v0.2.0
func (*MantleBackupConfigReconciler) Reconcile ¶ added in v0.2.0
func (r *MantleBackupConfigReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the MantleBackupConfig 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.16.3/pkg/reconcile
func (*MantleBackupConfigReconciler) SetupWithManager ¶ added in v0.2.0
func (r *MantleBackupConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type MantleBackupReconciler ¶
type MantleBackupReconciler struct { client.Client Scheme *runtime.Scheme // contains filtered or unexported fields }
MantleBackupReconciler reconciles a MantleBackup object
func NewMantleBackupReconciler ¶
func NewMantleBackupReconciler( client client.Client, scheme *runtime.Scheme, managedCephClusterID, role string, primarySettings *PrimarySettings, podImage string, envSecret string, objectStorageSettings *ObjectStorageSettings, proxySettings *ProxySettings, ) *MantleBackupReconciler
NewMantleBackupReconciler returns NodeReconciler.
func (*MantleBackupReconciler) Reconcile ¶
func (r *MantleBackupReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the MantleBackup 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.16.3/pkg/reconcile
func (*MantleBackupReconciler) SetupWithManager ¶
func (r *MantleBackupReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type MantleRestoreReconciler ¶ added in v0.2.0
type MantleRestoreReconciler struct { Scheme *runtime.Scheme // contains filtered or unexported fields }
MantleRestoreReconciler reconciles a MantleRestore object
func NewMantleRestoreReconciler ¶ added in v0.2.0
func (*MantleRestoreReconciler) SetupWithManager ¶ added in v0.2.0
func (r *MantleRestoreReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type MantleRestoreReconcilerE2E ¶ added in v0.2.0
type MantleRestoreReconcilerE2E struct {
MantleRestoreReconciler
}
MantleRestoreReconcilerE2E is a wrapper of MantleRestoreReconciler this module is for testing cloneImageFromBackup and removeRBDImage in e2e tests
func NewMantleRestoreReconcilerE2E ¶ added in v0.2.0
func NewMantleRestoreReconcilerE2E(managedCephClusterID, toolsNamespace string) *MantleRestoreReconcilerE2E
func (*MantleRestoreReconcilerE2E) CloneImageFromBackup ¶ added in v0.2.0
func (r *MantleRestoreReconcilerE2E) CloneImageFromBackup(ctx context.Context, restore *mantlev1.MantleRestore, backup *mantlev1.MantleBackup) error
type ObjectStorageSettings ¶ added in v0.2.0
type PersistentVolumeReconciler ¶ added in v0.2.0
type PersistentVolumeReconciler struct { Scheme *runtime.Scheme // contains filtered or unexported fields }
PersistentVolumeReconciler reconciles a PersistentVolume object
func NewPersistentVolumeReconciler ¶ added in v0.2.0
func (*PersistentVolumeReconciler) Reconcile ¶ added in v0.2.0
func (r *PersistentVolumeReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the PersistentVolume 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.16.3/pkg/reconcile
func (*PersistentVolumeReconciler) SetupWithManager ¶ added in v0.2.0
func (r *PersistentVolumeReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type PersistentVolumeReconcilerE2E ¶ added in v0.2.0
type PersistentVolumeReconcilerE2E struct {
PersistentVolumeReconciler
}
PersistentVolumeReconcilerE2E is a wrapper of PersistentVolumeReconciler. This module is used to test removeRBDImage in e2e tests.
func NewPersistentVolumeReconcilerE2E ¶ added in v0.2.0
func NewPersistentVolumeReconcilerE2E(toolsNamespace string) *PersistentVolumeReconcilerE2E
func (*PersistentVolumeReconcilerE2E) RemoveRBDImage ¶ added in v0.2.0
func (r *PersistentVolumeReconcilerE2E) RemoveRBDImage(ctx context.Context, pv *corev1.PersistentVolume) error
type PrimarySettings ¶ added in v0.2.0
type PrimarySettings struct { ServiceEndpoint string Conn *grpc.ClientConn Client proto.MantleServiceClient MaxExportJobs int ExportDataStorageClass string }
type ProxySettings ¶ added in v0.2.1
type SecondaryServer ¶ added in v0.2.0
type SecondaryServer struct { proto.UnimplementedMantleServiceServer // contains filtered or unexported fields }
func NewSecondaryServer ¶ added in v0.2.0
func NewSecondaryServer(client client.Client, reader client.Reader) *SecondaryServer
func (*SecondaryServer) CreateOrUpdateMantleBackup ¶ added in v0.2.0
func (s *SecondaryServer) CreateOrUpdateMantleBackup( ctx context.Context, req *proto.CreateOrUpdateMantleBackupRequest, ) (*proto.CreateOrUpdateMantleBackupResponse, error)
func (*SecondaryServer) CreateOrUpdatePVC ¶ added in v0.2.0
func (s *SecondaryServer) CreateOrUpdatePVC( ctx context.Context, req *proto.CreateOrUpdatePVCRequest, ) (*proto.CreateOrUpdatePVCResponse, error)
func (*SecondaryServer) ListMantleBackup ¶ added in v0.2.0
func (s *SecondaryServer) ListMantleBackup( ctx context.Context, req *proto.ListMantleBackupRequest, ) (*proto.ListMantleBackupResponse, error)
func (*SecondaryServer) SetSynchronizing ¶ added in v0.2.0
func (s *SecondaryServer) SetSynchronizing( ctx context.Context, req *proto.SetSynchronizingRequest, ) (*proto.SetSynchronizingResponse, error)
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
objectstorage
Package objectstorage is a generated GoMock package.
|
Package objectstorage is a generated GoMock package. |