controller

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FinBackupFinalizerName = "finbackup.fin.cybozu.io/finalizer"

	LabelFinBackupConfigUID = "fin.cybozu.io/fbc-uid"

	// Annotations
	AnnotationBackupTargetRBDImage = "fin.cybozu.io/backup-target-rbd-image"

	AnnotationSkipVerify = "fin.cybozu.io/skip-verify"

	AnnotationFullBackup = "fin.cybozu.io/full-backup"
)
View Source
const (
	EnvRawImgExpansionUnitSize = "FIN_RAW_IMG_EXPANSION_UNIT_SIZE"
	EnvRawChecksumChunkSize    = "FIN_RAW_CHECKSUM_CHUNK_SIZE"
	EnvDiffChecksumChunkSize   = "FIN_DIFF_CHECKSUM_CHUNK_SIZE"
	EnvEnableChecksumVerify    = "ENABLE_CHECKSUM_VERIFY"
)
View Source
const (
	FinRestoreFinalizerName = "finrestore.fin.cybozu.io/finalizer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FinBackupConfigReconciler added in v0.2.2

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

FinBackupConfigReconciler reconciles a FinBackupConfig object

func NewFinBackupConfigReconciler added in v0.2.2

func NewFinBackupConfigReconciler(
	client client.Client,
	scheme *runtime.Scheme,
	overwriteFBCSchedule string,
	managedCephClusterID string,
	podImage string,
	serviceAccountName string,
) *FinBackupConfigReconciler

func (*FinBackupConfigReconciler) Reconcile added in v0.2.2

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 FinBackupConfig 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 (*FinBackupConfigReconciler) SetupWithManager added in v0.2.2

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

SetupWithManager sets up the controller with the Manager.

type FinBackupReconciler

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

FinBackupReconciler reconciles a FinBackup object

func NewFinBackupReconciler

func NewFinBackupReconciler(
	client client.Client,
	scheme *runtime.Scheme,
	cephClusterNamespace string,
	podImage string,
	maxPartSize *resource.Quantity,
	snapRepo model.RBDSnapshotRepository,
	imageLocker model.RBDImageLocker,
	rawImgExpansionUnitSize,
	rawChecksumChunkSize,
	diffChecksumChunkSize uint64,
) *FinBackupReconciler

func (*FinBackupReconciler) Reconcile

func (r *FinBackupReconciler) 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 FinBackup 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.17.3/pkg/reconcile

func (*FinBackupReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type FinRestoreReconciler

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

FinRestoreReconciler reconciles a FinRestore object

func NewFinRestoreReconciler

func NewFinRestoreReconciler(
	client client.Client,
	scheme *runtime.Scheme,
	namespace string,
	podImage string,
	rawImageChunkSize *resource.Quantity,
) *FinRestoreReconciler

func (*FinRestoreReconciler) Reconcile

func (r *FinRestoreReconciler) 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 FinRestore 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.17.3/pkg/reconcile

func (*FinRestoreReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type JobStatus added in v0.5.5

type JobStatus int
const (
	JobStatusComplete JobStatus = iota
	JobStatusInProgress
	JobStatusFailedWithExitCode1
	JobStatusFailedWithExitCode2
	JobStatusFailedWithExitCode3
	JobStatusUnknown
)

type JobStatusResult added in v0.5.5

type JobStatusResult struct {
	Status   JobStatus
	ExitCode int32
}

func CheckJobStatus added in v0.5.5

func CheckJobStatus(
	ctx context.Context,
	r client.Client,
	jobName string,
	namespace string,
) (JobStatusResult, error)

Jump to

Keyboard shortcuts

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