diff --git a/go.mod b/go.mod index 6fc74b99f..ada738aae 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/konveyor/forklift-controller -go 1.20 +go 1.21 require ( github.com/gin-contrib/cors v1.3.1 @@ -38,7 +38,7 @@ require ( k8s.io/klog/v2 v2.110.1 k8s.io/utils v0.0.0-20240102154912-e7106e64919e kubevirt.io/api v1.1.1 - kubevirt.io/containerized-data-importer-api v1.57.0-alpha1 + kubevirt.io/containerized-data-importer-api v1.59.0 libvirt.org/libvirt-go-xml v7.4.0+incompatible sigs.k8s.io/controller-runtime v0.16.3 ) diff --git a/go.sum b/go.sum index 1ca130c48..24abff205 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,7 @@ github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb0 github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -82,6 +83,7 @@ github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/e github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= @@ -169,6 +171,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -257,6 +260,7 @@ github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGy github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -275,6 +279,7 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= @@ -292,6 +297,7 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= @@ -511,8 +517,8 @@ k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCf k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= kubevirt.io/api v1.1.1 h1:vt5bOpACArNFIudx1bcE1VeejQdh5wCd7Oz/uFBIkH8= kubevirt.io/api v1.1.1/go.mod h1:CJ4vZsaWhVN3jNbyc9y3lIZhw8nUHbWjap0xHABQiqc= -kubevirt.io/containerized-data-importer-api v1.57.0-alpha1 h1:IWo12+ei3jltSN5jQN1xjgakfvRSF3G3Rr4GXVOOy2I= -kubevirt.io/containerized-data-importer-api v1.57.0-alpha1/go.mod h1:Y/8ETgHS1GjO89bl682DPtQOYEU/1ctPFBz6Sjxm4DM= +kubevirt.io/containerized-data-importer-api v1.59.0 h1:GdDt9BlR0qHejpMaPfASbsG8JWDmBf1s7xZBj5W9qn0= +kubevirt.io/containerized-data-importer-api v1.59.0/go.mod h1:4yOGtCE7HvgKp7wftZZ3TBvDJ0x9d6N6KaRjRYcUFpE= kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 h1:QMrd0nKP0BGbnxTqakhDZAUhGKxPiPiN5gSDqKUmGGc= kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90/go.mod h1:018lASpFYBsYN6XwmA2TIrPCx6e0gviTd/ZNtSitKgc= libvirt.org/libvirt-go-xml v7.4.0+incompatible h1:NaCRjbtz//xuTZOp1nDHbe0eu5BQlhIy5PPuc09EWtU= diff --git a/pkg/controller/plan/migration.go b/pkg/controller/plan/migration.go index 904e9c81f..714b9770d 100644 --- a/pkg/controller/plan/migration.go +++ b/pkg/controller/plan/migration.go @@ -1454,6 +1454,13 @@ func (r *Migration) ensureGuestConversionPod(vm *plan.VMStatus) (ready bool, err return } +func (r *Migration) setTaskCompleted(task *plan.Task) { + task.Phase = Completed + task.Reason = TransferCompleted + task.Progress.Completed = task.Progress.Total + task.MarkCompleted() +} + // Update the progress of the appropriate disk copy step. (DiskTransfer, Cutover) func (r *Migration) updateCopyProgress(vm *plan.VMStatus, step *plan.Step) (err error) { var pendingReason string @@ -1484,10 +1491,7 @@ func (r *Migration) updateCopyProgress(vm *plan.VMStatus, step *plan.Step) (err } if pvc.Status.Phase == core.ClaimBound { completed++ - task.Phase = Completed - task.Reason = TransferCompleted - task.Progress.Completed = task.Progress.Total - task.MarkCompleted() + r.setTaskCompleted(task) } } } else { @@ -1499,14 +1503,14 @@ func (r *Migration) updateCopyProgress(vm *plan.VMStatus, step *plan.Step) (err if !found { continue } + if dv.Status.Phase == cdi.PendingPopulation && r.Source.Provider.Type() == v1beta1.VSphere { + dv.Status.Phase = cdi.Succeeded + } conditions := dv.Conditions() switch dv.Status.Phase { case cdi.Succeeded, cdi.Paused: completed++ - task.Phase = Completed - task.Reason = TransferCompleted - task.Progress.Completed = task.Progress.Total - task.MarkCompleted() + r.setTaskCompleted(task) case cdi.Pending, cdi.ImportScheduled: pending++ task.Phase = Pending diff --git a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types.go b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types.go index 86dc46c25..e2c54111b 100644 --- a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types.go +++ b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types.go @@ -106,6 +106,9 @@ type StorageSpec struct { DataSourceRef *corev1.TypedObjectReference `json:"dataSourceRef,omitempty"` } +// PersistentVolumeFromStorageProfile means the volume mode will be auto selected by CDI according to a matching StorageProfile +const PersistentVolumeFromStorageProfile corev1.PersistentVolumeMode = "FromStorageProfile" + // DataVolumeCheckpoint defines a stage in a warm migration. type DataVolumeCheckpoint struct { // Previous is the identifier of the snapshot from the previous checkpoint. @@ -379,6 +382,11 @@ const ( // Paused represents a DataVolumePhase of Paused Paused DataVolumePhase = "Paused" + // PrepClaimInProgress represents a data volume with a current phase of PrepClaimInProgress + PrepClaimInProgress DataVolumePhase = "PrepClaimInProgress" + // RebindInProgress represents a data volume with a current phase of RebindInProgress + RebindInProgress DataVolumePhase = "RebindInProgress" + // DataVolumeReady is the condition that indicates if the data volume is ready to be consumed. DataVolumeReady DataVolumeConditionType = "Ready" // DataVolumeBound is the condition that indicates if the underlying PVC is bound or not. @@ -413,7 +421,12 @@ type StorageProfileSpec struct { // CloneStrategy defines the preferred method for performing a CDI clone CloneStrategy *CDICloneStrategy `json:"cloneStrategy,omitempty"` // ClaimPropertySets is a provided set of properties applicable to PVC + // +kubebuilder:validation:MaxItems=8 ClaimPropertySets []ClaimPropertySet `json:"claimPropertySets,omitempty"` + // DataImportCronSourceFormat defines the format of the DataImportCron-created disk image sources + DataImportCronSourceFormat *DataImportCronSourceFormat `json:"dataImportCronSourceFormat,omitempty"` + // SnapshotClass is optional specific VolumeSnapshotClass for CloneStrategySnapshot. If not set, a VolumeSnapshotClass is chosen according to the provisioner. + SnapshotClass *string `json:"snapshotClass,omitempty"` } // StorageProfileStatus provides the most recently observed status of the StorageProfile @@ -425,19 +438,25 @@ type StorageProfileStatus struct { // CloneStrategy defines the preferred method for performing a CDI clone CloneStrategy *CDICloneStrategy `json:"cloneStrategy,omitempty"` // ClaimPropertySets computed from the spec and detected in the system + // +kubebuilder:validation:MaxItems=8 ClaimPropertySets []ClaimPropertySet `json:"claimPropertySets,omitempty"` + // DataImportCronSourceFormat defines the format of the DataImportCron-created disk image sources + DataImportCronSourceFormat *DataImportCronSourceFormat `json:"dataImportCronSourceFormat,omitempty"` + // SnapshotClass is optional specific VolumeSnapshotClass for CloneStrategySnapshot. If not set, a VolumeSnapshotClass is chosen according to the provisioner. + SnapshotClass *string `json:"snapshotClass,omitempty"` } // ClaimPropertySet is a set of properties applicable to PVC type ClaimPropertySet struct { // AccessModes contains the desired access modes the volume should have. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - // +optional - AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` + // +kubebuilder:validation:MaxItems=4 + // +kubebuilder:validation:XValidation:rule="self.all(am, am in ['ReadWriteOnce', 'ReadOnlyMany', 'ReadWriteMany', 'ReadWriteOncePod'])", message="Illegal AccessMode" + AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes"` // VolumeMode defines what type of volume is required by the claim. // Value of Filesystem is implied when not included in claim spec. - // +optional - VolumeMode *corev1.PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"` + // +kubebuilder:validation:Enum="Block";"Filesystem" + VolumeMode *corev1.PersistentVolumeMode `json:"volumeMode"` } // StorageProfileList provides the needed parameters to request a list of StorageProfile from the system @@ -524,6 +543,7 @@ type DataSourceList struct { // +kubebuilder:object:root=true // +kubebuilder:storageversion // +kubebuilder:resource:shortName=dic;dics,categories=all +// +kubebuilder:printcolumn:name="Format",type="string",JSONPath=".status.sourceFormat",description="The format in which created sources are saved" type DataImportCron struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -582,8 +602,10 @@ type DataImportCronStatus struct { // LastExecutionTimestamp is the time of the last polling LastExecutionTimestamp *metav1.Time `json:"lastExecutionTimestamp,omitempty"` // LastImportTimestamp is the time of the last import - LastImportTimestamp *metav1.Time `json:"lastImportTimestamp,omitempty"` - Conditions []DataImportCronCondition `json:"conditions,omitempty" optional:"true"` + LastImportTimestamp *metav1.Time `json:"lastImportTimestamp,omitempty"` + // SourceFormat defines the format of the DataImportCron-created disk image sources + SourceFormat *DataImportCronSourceFormat `json:"sourceFormat,omitempty"` + Conditions []DataImportCronCondition `json:"conditions,omitempty" optional:"true"` } // ImportStatus of a currently in progress import @@ -644,6 +666,12 @@ type VolumeImportSourceSpec struct { Preallocation *bool `json:"preallocation,omitempty"` // ContentType represents the type of the imported data (Kubevirt or archive) ContentType DataVolumeContentType `json:"contentType,omitempty"` + // TargetClaim the name of the specific claim to be populated with a multistage import. + TargetClaim *string `json:"targetClaim,omitempty"` + // Checkpoints is a list of DataVolumeCheckpoints, representing stages in a multistage import. + Checkpoints []DataVolumeCheckpoint `json:"checkpoints,omitempty"` + // FinalCheckpoint indicates whether the current DataVolumeCheckpoint is the final checkpoint. + FinalCheckpoint *bool `json:"finalCheckpoint,omitempty"` } // ImportSourceType contains each one of the source types allowed in a VolumeImportSource @@ -802,10 +830,11 @@ type CDISpec struct { // +kubebuilder:validation:Enum=RemoveWorkloads;BlockUninstallIfWorkloadsExist // CDIUninstallStrategy defines the state to leave CDI on uninstall UninstallStrategy *CDIUninstallStrategy `json:"uninstallStrategy,omitempty"` - // Rules on which nodes CDI infrastructure pods will be scheduled - Infra sdkapi.NodePlacement `json:"infra,omitempty"` + // Selectors and tolerations that should apply to cdi infrastructure components + Infra ComponentConfig `json:"infra,omitempty"` // Restrict on which nodes CDI workload pods will be scheduled - Workloads sdkapi.NodePlacement `json:"workload,omitempty"` + Workloads sdkapi.NodePlacement `json:"workload,omitempty"` + CustomizeComponents CustomizeComponents `json:"customizeComponents,omitempty"` // Clone strategy override: should we use a host-assisted copy even if snapshots are available? // +kubebuilder:validation:Enum="copy";"snapshot";"csi-clone" CloneStrategyOverride *CDICloneStrategy `json:"cloneStrategyOverride,omitempty"` @@ -817,6 +846,18 @@ type CDISpec struct { PriorityClass *CDIPriorityClass `json:"priorityClass,omitempty"` } +// ComponentConfig defines the scheduling and replicas configuration for CDI components +type ComponentConfig struct { + // NodePlacement describes scheduling configuration for specific CDI components + sdkapi.NodePlacement `json:",inline"` + // DeploymentReplicas set Replicas for cdi-deployment + DeploymentReplicas *int32 `json:"deploymentReplicas,omitempty"` + // ApiserverReplicas set Replicas for cdi-apiserver + APIServerReplicas *int32 `json:"apiServerReplicas,omitempty"` + // UploadproxyReplicas set Replicas for cdi-uploadproxy + UploadProxyReplicas *int32 `json:"uploadProxyReplicas,omitempty"` +} + // CDIPriorityClass defines the priority class of the CDI control plane. type CDIPriorityClass string @@ -834,6 +875,58 @@ const ( CloneStrategyCsiClone CDICloneStrategy = "csi-clone" ) +// CustomizeComponents defines patches for components deployed by the CDI operator. +type CustomizeComponents struct { + // +listType=atomic + Patches []CustomizeComponentsPatch `json:"patches,omitempty"` + + // Configure the value used for deployment and daemonset resources + Flags *Flags `json:"flags,omitempty"` +} + +// Flags will create a patch that will replace all flags for the container's +// command field. The only flags that will be used are those define. There are no +// guarantees around forward/backward compatibility. If set incorrectly this will +// cause the resource when rolled out to error until flags are updated. +type Flags struct { + API map[string]string `json:"api,omitempty"` + Controller map[string]string `json:"controller,omitempty"` + UploadProxy map[string]string `json:"uploadProxy,omitempty"` +} + +// CustomizeComponentsPatch defines a patch for some resource. +type CustomizeComponentsPatch struct { + // +kubebuilder:validation:MinLength=1 + ResourceName string `json:"resourceName"` + // +kubebuilder:validation:MinLength=1 + ResourceType string `json:"resourceType"` + Patch string `json:"patch"` + Type PatchType `json:"type"` +} + +// PatchType defines the patch type. +type PatchType string + +const ( + // JSONPatchType is a constant that represents the type of JSON patch. + JSONPatchType PatchType = "json" + // MergePatchType is a constant that represents the type of JSON Merge patch. + MergePatchType PatchType = "merge" + // StrategicMergePatchType is a constant that represents the type of Strategic Merge patch. + StrategicMergePatchType PatchType = "strategic" +) + +// DataImportCronSourceFormat defines the format of the DataImportCron-created disk image sources +type DataImportCronSourceFormat string + +const ( + // DataImportCronSourceFormatSnapshot implies using a VolumeSnapshot as the resulting DataImportCron disk image source + DataImportCronSourceFormatSnapshot DataImportCronSourceFormat = "snapshot" + + // DataImportCronSourceFormatPvc implies using a PVC as the resulting DataImportCron disk image source + DataImportCronSourceFormatPvc DataImportCronSourceFormat = "pvc" +) + // CDIUninstallStrategy defines the state to leave CDI on uninstall type CDIUninstallStrategy string @@ -913,13 +1006,16 @@ type CDIConfigSpec struct { Preallocation *bool `json:"preallocation,omitempty"` // InsecureRegistries is a list of TLS disabled registries InsecureRegistries []string `json:"insecureRegistries,omitempty"` - // DataVolumeTTLSeconds is the time in seconds after DataVolume completion it can be garbage collected. The default is 0 sec. To disable GC use -1. + // DataVolumeTTLSeconds is the time in seconds after DataVolume completion it can be garbage collected. Disabled by default. // +optional DataVolumeTTLSeconds *int32 `json:"dataVolumeTTLSeconds,omitempty"` // TLSSecurityProfile is used by operators to apply cluster-wide TLS security settings to operands. TLSSecurityProfile *ocpconfigv1.TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` // The imagePullSecrets used to pull the container images ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` + // LogVerbosity overrides the default verbosity level used to initialize loggers + // +optional + LogVerbosity *int32 `json:"logVerbosity,omitempty"` } // CDIConfigStatus provides the most recently observed status of the CDI Config resource diff --git a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_swagger_generated.go b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_swagger_generated.go index aaa83e1c2..49246a912 100644 --- a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_swagger_generated.go +++ b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/types_swagger_generated.go @@ -180,27 +180,31 @@ func (StorageProfile) SwaggerDoc() map[string]string { func (StorageProfileSpec) SwaggerDoc() map[string]string { return map[string]string{ - "": "StorageProfileSpec defines specification for StorageProfile", - "cloneStrategy": "CloneStrategy defines the preferred method for performing a CDI clone", - "claimPropertySets": "ClaimPropertySets is a provided set of properties applicable to PVC", + "": "StorageProfileSpec defines specification for StorageProfile", + "cloneStrategy": "CloneStrategy defines the preferred method for performing a CDI clone", + "claimPropertySets": "ClaimPropertySets is a provided set of properties applicable to PVC\n+kubebuilder:validation:MaxItems=8", + "dataImportCronSourceFormat": "DataImportCronSourceFormat defines the format of the DataImportCron-created disk image sources", + "snapshotClass": "SnapshotClass is optional specific VolumeSnapshotClass for CloneStrategySnapshot. If not set, a VolumeSnapshotClass is chosen according to the provisioner.", } } func (StorageProfileStatus) SwaggerDoc() map[string]string { return map[string]string{ - "": "StorageProfileStatus provides the most recently observed status of the StorageProfile", - "storageClass": "The StorageClass name for which capabilities are defined", - "provisioner": "The Storage class provisioner plugin name", - "cloneStrategy": "CloneStrategy defines the preferred method for performing a CDI clone", - "claimPropertySets": "ClaimPropertySets computed from the spec and detected in the system", + "": "StorageProfileStatus provides the most recently observed status of the StorageProfile", + "storageClass": "The StorageClass name for which capabilities are defined", + "provisioner": "The Storage class provisioner plugin name", + "cloneStrategy": "CloneStrategy defines the preferred method for performing a CDI clone", + "claimPropertySets": "ClaimPropertySets computed from the spec and detected in the system\n+kubebuilder:validation:MaxItems=8", + "dataImportCronSourceFormat": "DataImportCronSourceFormat defines the format of the DataImportCron-created disk image sources", + "snapshotClass": "SnapshotClass is optional specific VolumeSnapshotClass for CloneStrategySnapshot. If not set, a VolumeSnapshotClass is chosen according to the provisioner.", } } func (ClaimPropertySet) SwaggerDoc() map[string]string { return map[string]string{ "": "ClaimPropertySet is a set of properties applicable to PVC", - "accessModes": "AccessModes contains the desired access modes the volume should have.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1\n+optional", - "volumeMode": "VolumeMode defines what type of volume is required by the claim.\nValue of Filesystem is implied when not included in claim spec.\n+optional", + "accessModes": "AccessModes contains the desired access modes the volume should have.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1\n+kubebuilder:validation:MaxItems=4\n+kubebuilder:validation:XValidation:rule=\"self.all(am, am in ['ReadWriteOnce', 'ReadOnlyMany', 'ReadWriteMany', 'ReadWriteOncePod'])\", message=\"Illegal AccessMode\"", + "volumeMode": "VolumeMode defines what type of volume is required by the claim.\nValue of Filesystem is implied when not included in claim spec.\n+kubebuilder:validation:Enum=\"Block\";\"Filesystem\"", } } @@ -260,7 +264,7 @@ func (DataSourceList) SwaggerDoc() map[string]string { func (DataImportCron) SwaggerDoc() map[string]string { return map[string]string{ - "": "DataImportCron defines a cron job for recurring polling/importing disk images as PVCs into a golden image namespace\n+genclient\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+kubebuilder:object:root=true\n+kubebuilder:storageversion\n+kubebuilder:resource:shortName=dic;dics,categories=all", + "": "DataImportCron defines a cron job for recurring polling/importing disk images as PVCs into a golden image namespace\n+genclient\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object\n+kubebuilder:object:root=true\n+kubebuilder:storageversion\n+kubebuilder:resource:shortName=dic;dics,categories=all\n+kubebuilder:printcolumn:name=\"Format\",type=\"string\",JSONPath=\".status.sourceFormat\",description=\"The format in which created sources are saved\"", } } @@ -283,6 +287,7 @@ func (DataImportCronStatus) SwaggerDoc() map[string]string { "lastImportedPVC": "LastImportedPVC is the last imported PVC", "lastExecutionTimestamp": "LastExecutionTimestamp is the time of the last polling", "lastImportTimestamp": "LastImportTimestamp is the time of the last import", + "sourceFormat": "SourceFormat defines the format of the DataImportCron-created disk image sources", } } @@ -316,10 +321,13 @@ func (VolumeImportSource) SwaggerDoc() map[string]string { func (VolumeImportSourceSpec) SwaggerDoc() map[string]string { return map[string]string{ - "": "VolumeImportSourceSpec defines the Spec field for VolumeImportSource", - "source": "Source is the src of the data to be imported in the target PVC", - "preallocation": "Preallocation controls whether storage for the target PVC should be allocated in advance.", - "contentType": "ContentType represents the type of the imported data (Kubevirt or archive)", + "": "VolumeImportSourceSpec defines the Spec field for VolumeImportSource", + "source": "Source is the src of the data to be imported in the target PVC", + "preallocation": "Preallocation controls whether storage for the target PVC should be allocated in advance.", + "contentType": "ContentType represents the type of the imported data (Kubevirt or archive)", + "targetClaim": "TargetClaim the name of the specific claim to be populated with a multistage import.", + "checkpoints": "Checkpoints is a list of DataVolumeCheckpoints, representing stages in a multistage import.", + "finalCheckpoint": "FinalCheckpoint indicates whether the current DataVolumeCheckpoint is the final checkpoint.", } } @@ -420,7 +428,7 @@ func (CDISpec) SwaggerDoc() map[string]string { "": "CDISpec defines our specification for the CDI installation", "imagePullPolicy": "+kubebuilder:validation:Enum=Always;IfNotPresent;Never\nPullPolicy describes a policy for if/when to pull a container image", "uninstallStrategy": "+kubebuilder:validation:Enum=RemoveWorkloads;BlockUninstallIfWorkloadsExist\nCDIUninstallStrategy defines the state to leave CDI on uninstall", - "infra": "Rules on which nodes CDI infrastructure pods will be scheduled", + "infra": "Selectors and tolerations that should apply to cdi infrastructure components", "workload": "Restrict on which nodes CDI workload pods will be scheduled", "cloneStrategyOverride": "Clone strategy override: should we use a host-assisted copy even if snapshots are available?\n+kubebuilder:validation:Enum=\"copy\";\"snapshot\";\"csi-clone\"", "config": "CDIConfig at CDI level", @@ -429,6 +437,37 @@ func (CDISpec) SwaggerDoc() map[string]string { } } +func (ComponentConfig) SwaggerDoc() map[string]string { + return map[string]string{ + "": "ComponentConfig defines the scheduling and replicas configuration for CDI components", + "deploymentReplicas": "DeploymentReplicas set Replicas for cdi-deployment", + "apiServerReplicas": "ApiserverReplicas set Replicas for cdi-apiserver", + "uploadProxyReplicas": "UploadproxyReplicas set Replicas for cdi-uploadproxy", + } +} + +func (CustomizeComponents) SwaggerDoc() map[string]string { + return map[string]string{ + "": "CustomizeComponents defines patches for components deployed by the CDI operator.", + "patches": "+listType=atomic", + "flags": "Configure the value used for deployment and daemonset resources", + } +} + +func (Flags) SwaggerDoc() map[string]string { + return map[string]string{ + "": "Flags will create a patch that will replace all flags for the container's\ncommand field. The only flags that will be used are those define. There are no\nguarantees around forward/backward compatibility. If set incorrectly this will\ncause the resource when rolled out to error until flags are updated.", + } +} + +func (CustomizeComponentsPatch) SwaggerDoc() map[string]string { + return map[string]string{ + "": "CustomizeComponentsPatch defines a patch for some resource.", + "resourceName": "+kubebuilder:validation:MinLength=1", + "resourceType": "+kubebuilder:validation:MinLength=1", + } +} + func (CDIStatus) SwaggerDoc() map[string]string { return map[string]string{ "": "CDIStatus defines the status of the installation", @@ -467,9 +506,10 @@ func (CDIConfigSpec) SwaggerDoc() map[string]string { "filesystemOverhead": "FilesystemOverhead describes the space reserved for overhead when using Filesystem volumes. A value is between 0 and 1, if not defined it is 0.055 (5.5% overhead)", "preallocation": "Preallocation controls whether storage for DataVolumes should be allocated in advance.", "insecureRegistries": "InsecureRegistries is a list of TLS disabled registries", - "dataVolumeTTLSeconds": "DataVolumeTTLSeconds is the time in seconds after DataVolume completion it can be garbage collected. The default is 0 sec. To disable GC use -1.\n+optional", + "dataVolumeTTLSeconds": "DataVolumeTTLSeconds is the time in seconds after DataVolume completion it can be garbage collected. Disabled by default.\n+optional", "tlsSecurityProfile": "TLSSecurityProfile is used by operators to apply cluster-wide TLS security settings to operands.", "imagePullSecrets": "The imagePullSecrets used to pull the container images", + "logVerbosity": "LogVerbosity overrides the default verbosity level used to initialize loggers\n+optional", } } diff --git a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/zz_generated.deepcopy.go b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/zz_generated.deepcopy.go index a8ea39f6f..30b665b73 100644 --- a/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/zz_generated.deepcopy.go +++ b/vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1/zz_generated.deepcopy.go @@ -201,6 +201,11 @@ func (in *CDIConfigSpec) DeepCopyInto(out *CDIConfigSpec) { *out = make([]v1.LocalObjectReference, len(*in)) copy(*out, *in) } + if in.LogVerbosity != nil { + in, out := &in.LogVerbosity, &out.LogVerbosity + *out = new(int32) + **out = **in + } return } @@ -298,6 +303,7 @@ func (in *CDISpec) DeepCopyInto(out *CDISpec) { } in.Infra.DeepCopyInto(&out.Infra) in.Workloads.DeepCopyInto(&out.Workloads) + in.CustomizeComponents.DeepCopyInto(&out.CustomizeComponents) if in.CloneStrategyOverride != nil { in, out := &in.CloneStrategyOverride, &out.CloneStrategyOverride *out = new(CDICloneStrategy) @@ -400,6 +406,38 @@ func (in *ClaimPropertySet) DeepCopy() *ClaimPropertySet { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComponentConfig) DeepCopyInto(out *ComponentConfig) { + *out = *in + in.NodePlacement.DeepCopyInto(&out.NodePlacement) + if in.DeploymentReplicas != nil { + in, out := &in.DeploymentReplicas, &out.DeploymentReplicas + *out = new(int32) + **out = **in + } + if in.APIServerReplicas != nil { + in, out := &in.APIServerReplicas, &out.APIServerReplicas + *out = new(int32) + **out = **in + } + if in.UploadProxyReplicas != nil { + in, out := &in.UploadProxyReplicas, &out.UploadProxyReplicas + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentConfig. +func (in *ComponentConfig) DeepCopy() *ComponentConfig { + if in == nil { + return nil + } + out := new(ComponentConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConditionState) DeepCopyInto(out *ConditionState) { *out = *in @@ -418,6 +456,48 @@ func (in *ConditionState) DeepCopy() *ConditionState { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomizeComponents) DeepCopyInto(out *CustomizeComponents) { + *out = *in + if in.Patches != nil { + in, out := &in.Patches, &out.Patches + *out = make([]CustomizeComponentsPatch, len(*in)) + copy(*out, *in) + } + if in.Flags != nil { + in, out := &in.Flags, &out.Flags + *out = new(Flags) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomizeComponents. +func (in *CustomizeComponents) DeepCopy() *CustomizeComponents { + if in == nil { + return nil + } + out := new(CustomizeComponents) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomizeComponentsPatch) DeepCopyInto(out *CustomizeComponentsPatch) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomizeComponentsPatch. +func (in *CustomizeComponentsPatch) DeepCopy() *CustomizeComponentsPatch { + if in == nil { + return nil + } + out := new(CustomizeComponentsPatch) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DataImportCron) DeepCopyInto(out *DataImportCron) { *out = *in @@ -549,6 +629,11 @@ func (in *DataImportCronStatus) DeepCopyInto(out *DataImportCronStatus) { in, out := &in.LastImportTimestamp, &out.LastImportTimestamp *out = (*in).DeepCopy() } + if in.SourceFormat != nil { + in, out := &in.SourceFormat, &out.SourceFormat + *out = new(DataImportCronSourceFormat) + **out = **in + } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]DataImportCronCondition, len(*in)) @@ -1183,6 +1268,43 @@ func (in *FilesystemOverhead) DeepCopy() *FilesystemOverhead { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Flags) DeepCopyInto(out *Flags) { + *out = *in + if in.API != nil { + in, out := &in.API, &out.API + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Controller != nil { + in, out := &in.Controller, &out.Controller + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.UploadProxy != nil { + in, out := &in.UploadProxy, &out.UploadProxy + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Flags. +func (in *Flags) DeepCopy() *Flags { + if in == nil { + return nil + } + out := new(Flags) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ImportProxy) DeepCopyInto(out *ImportProxy) { *out = *in @@ -1494,6 +1616,16 @@ func (in *StorageProfileSpec) DeepCopyInto(out *StorageProfileSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.DataImportCronSourceFormat != nil { + in, out := &in.DataImportCronSourceFormat, &out.DataImportCronSourceFormat + *out = new(DataImportCronSourceFormat) + **out = **in + } + if in.SnapshotClass != nil { + in, out := &in.SnapshotClass, &out.SnapshotClass + *out = new(string) + **out = **in + } return } @@ -1532,6 +1664,16 @@ func (in *StorageProfileStatus) DeepCopyInto(out *StorageProfileStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.DataImportCronSourceFormat != nil { + in, out := &in.DataImportCronSourceFormat, &out.DataImportCronSourceFormat + *out = new(DataImportCronSourceFormat) + **out = **in + } + if in.SnapshotClass != nil { + in, out := &in.SnapshotClass, &out.SnapshotClass + *out = new(string) + **out = **in + } return } @@ -1802,6 +1944,21 @@ func (in *VolumeImportSourceSpec) DeepCopyInto(out *VolumeImportSourceSpec) { *out = new(bool) **out = **in } + if in.TargetClaim != nil { + in, out := &in.TargetClaim, &out.TargetClaim + *out = new(string) + **out = **in + } + if in.Checkpoints != nil { + in, out := &in.Checkpoints, &out.Checkpoints + *out = make([]DataVolumeCheckpoint, len(*in)) + copy(*out, *in) + } + if in.FinalCheckpoint != nil { + in, out := &in.FinalCheckpoint, &out.FinalCheckpoint + *out = new(bool) + **out = **in + } return } diff --git a/vendor/modules.txt b/vendor/modules.txt index 0fe814557..c71873187 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1044,8 +1044,8 @@ kubevirt.io/api/export kubevirt.io/api/export/v1alpha1 kubevirt.io/api/instancetype kubevirt.io/api/instancetype/v1beta1 -# kubevirt.io/containerized-data-importer-api v1.57.0-alpha1 -## explicit; go 1.19 +# kubevirt.io/containerized-data-importer-api v1.59.0 +## explicit; go 1.21 kubevirt.io/containerized-data-importer-api/pkg/apis/core kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1 # kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90