Documentation
¶
Index ¶
- Constants
- func CreateCommonPopulatorIndexes(mgr manager.Manager) error
- func IsPVCDataSourceRefKind(pvc *corev1.PersistentVolumeClaim, kind string) bool
- func NewClonePopulator(ctx context.Context, mgr manager.Manager, log logr.Logger, clonerImage string, ...) (controller.Controller, error)
- func NewForkliftPopulator(ctx context.Context, mgr manager.Manager, log logr.Logger, ...) (controller.Controller, error)
- func NewImportPopulator(ctx context.Context, mgr manager.Manager, log logr.Logger, ...) (controller.Controller, error)
- func NewUploadPopulator(ctx context.Context, mgr manager.Manager, log logr.Logger, ...) (controller.Controller, error)
- func PVCPrimeName(targetPVC *corev1.PersistentVolumeClaim) string
- type ClonePopulatorReconciler
- type ForkliftPopulatorReconciler
- type ImportPopulatorReconciler
- type Planner
- type ReconcilerBase
- type UploadPopulatorReconciler
Constants ¶
const ( // LabelOwnedByUID label sets the relationship between a resource and "owner" LabelOwnedByUID = "cdi.kubevirt.io/OwnedByUID" // AnnClonePhase tracks the status of the clone op AnnClonePhase = "cdi.kubevirt.io/clonePhase" // AnnCloneError has the error string for error phase AnnCloneError = "cdi.kubevirt.io/cloneError" // AnnCloneFallbackReason has the host-assisted clone fallback reason AnnCloneFallbackReason = "cdi.kubevirt.io/cloneFallbackReason" // AnnDataSourceNamespace has the namespace of the DataSource // this will be deprecated when cross namespace datasource goes beta AnnDataSourceNamespace = "cdi.kubevirt.io/dataSourceNamespace" )
const ( // AnnPVCPrimeName annotation is the name of the PVC' that is added to the target PVC // used by the upload-proxy in order to get the service name AnnPVCPrimeName = cc.AnnAPIGroup + "/storage.populator.pvcPrime" )
Variables ¶
This section is empty.
Functions ¶
func CreateCommonPopulatorIndexes ¶
CreateCommonPopulatorIndexes creates indexes used by all populators
func IsPVCDataSourceRefKind ¶
func IsPVCDataSourceRefKind(pvc *corev1.PersistentVolumeClaim, kind string) bool
IsPVCDataSourceRefKind returns if the PVC has a valid DataSourceRef that is equal to the given kind
func NewClonePopulator ¶
func NewClonePopulator( ctx context.Context, mgr manager.Manager, log logr.Logger, clonerImage string, pullPolicy string, installerLabels map[string]string, publicKey *rsa.PublicKey, ) (controller.Controller, error)
NewClonePopulator creates a new instance of the clone-populator controller
func NewForkliftPopulator ¶ added in v1.59.1
func NewForkliftPopulator( ctx context.Context, mgr manager.Manager, log logr.Logger, importerImage string, ovirtPopulatorImage string, installerLabels map[string]string, ) (controller.Controller, error)
NewForkliftPopulator creates a new instance of the forklift controller.
func NewImportPopulator ¶
func NewImportPopulator( ctx context.Context, mgr manager.Manager, log logr.Logger, installerLabels map[string]string, ) (controller.Controller, error)
NewImportPopulator creates a new instance of the import-populator controller
func NewUploadPopulator ¶
func NewUploadPopulator( ctx context.Context, mgr manager.Manager, log logr.Logger, installerLabels map[string]string, ) (controller.Controller, error)
NewUploadPopulator creates a new instance of the upload populator
func PVCPrimeName ¶
func PVCPrimeName(targetPVC *corev1.PersistentVolumeClaim) string
PVCPrimeName returns the name of the PVC' of a given pvc
Types ¶
type ClonePopulatorReconciler ¶
type ClonePopulatorReconciler struct { ReconcilerBase // contains filtered or unexported fields }
ClonePopulatorReconciler reconciles PVCs with VolumeCloneSources
type ForkliftPopulatorReconciler ¶ added in v1.59.1
type ForkliftPopulatorReconciler struct { ReconcilerBase // contains filtered or unexported fields }
ForkliftPopulatorReconciler members
type ImportPopulatorReconciler ¶
type ImportPopulatorReconciler struct {
ReconcilerBase
}
ImportPopulatorReconciler members
type Planner ¶
type Planner interface { ChooseStrategy(context.Context, *clone.ChooseStrategyArgs) (*clone.ChooseStrategyResult, error) Plan(context.Context, *clone.PlanArgs) ([]clone.Phase, error) Cleanup(context.Context, logr.Logger, client.Object) error }
Planner is an interface to mock out planner implementation for testing
type ReconcilerBase ¶
type ReconcilerBase struct {
// contains filtered or unexported fields
}
ReconcilerBase members
type UploadPopulatorReconciler ¶
type UploadPopulatorReconciler struct {
ReconcilerBase
}
UploadPopulatorReconciler members