Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/core/v1alpha2/cluster_virtual_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ type ClusterVirtualImageStatus struct {
// * `Ready`: The resource has been created and is ready to use.
// * `Failed`: There was an error when creating the resource.
// * `Terminating`: The resource is being deleted.
// +kubebuilder:validation:Enum:={Pending,Provisioning,WaitForUserUpload,Ready,Failed,Terminating}
// * `ImageLost`: The image is missing in DVCR. The resource cannot be used.
// +kubebuilder:validation:Enum:={Pending,Provisioning,WaitForUserUpload,Ready,Failed,Terminating,ImageLost}
Phase ImagePhase `json:"phase,omitempty"`
// Progress of copying an image from the source to DVCR. Appears only during the `Provisioning' phase.
Progress string `json:"progress,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions api/core/v1alpha2/cvicondition/condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,6 @@ const (
ProvisioningFailed ReadyReason = "ProvisioningFailed"
// Ready indicates that the import process is complete and the `ClusterVirtualImage` is ready for use.
Ready ReadyReason = "Ready"
// ImageLost indicates that the image in DVCR has been lost and the `ClusterVirtualImage` can no longer be used.
ImageLost ReadyReason = "ImageLost"
)
3 changes: 2 additions & 1 deletion api/core/v1alpha2/image_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const (
ImageReady ImagePhase = "Ready"
ImageFailed ImagePhase = "Failed"
ImageTerminating ImagePhase = "Terminating"
ImageLost ImagePhase = "PVCLost"
ImageLost ImagePhase = "ImageLost"
ImagePVCLost ImagePhase = "PVCLost"
)

type ImageUploadURLs struct {
Expand Down
6 changes: 5 additions & 1 deletion api/core/v1alpha2/vicondition/condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ const (
// DatasourceNotReady indicates that the datasource is not ready, which prevents the import process from starting.
DatasourceNotReady ReadyReason = "DatasourceNotReady"

// Lost indicates that the underlying PersistentVolumeClaim has been lost and the `VirtualImage` can no longer be used.
// ImageLost indicates that the image in DVCR has been lost and the `VirtualImage` can no longer be used.
ImageLost ReadyReason = "ImageLost"
// PVCLost indicates that the underlying PersistentVolumeClaim has been lost and the `VirtualImage` can no longer be used.
PVCLost ReadyReason = "PVCLost"
// Lost is deprecated, use PVCLost instead.
Lost ReadyReason = "PVCLost"

// StorageClassReady indicates that the chosen StorageClass exists.
Expand Down
3 changes: 2 additions & 1 deletion api/core/v1alpha2/virtual_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ type VirtualImageStatus struct {
// * `Ready`: The resource has been created and is ready to use.
// * `Failed`: There was an error when creating the resource.
// * `Terminating`: The resource is being deleted.
// * `ImageLost`: The image is missing in DVCR. The resource cannot be used.
// * `PVCLost`: The child PVC of the resource is missing. The resource cannot be used.
// +kubebuilder:validation:Enum:={Pending,Provisioning,WaitForUserUpload,Ready,Failed,Terminating,PVCLost}
// +kubebuilder:validation:Enum:={Pending,Provisioning,WaitForUserUpload,Ready,Failed,Terminating,ImageLost,PVCLost}
Phase ImagePhase `json:"phase,omitempty"`
// Progress of copying an image from a source to DVCR.
Progress string `json:"progress,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions crds/clustervirtualimages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -357,13 +357,15 @@ spec:
* `Ready`: The resource has been created and is ready to use.
* `Failed`: There was an error when creating the resource.
* `Terminating`: The resource is being deleted.
* `ImageLost`: The image is missing in DVCR. The resource cannot be used.
enum:
- Pending
- Provisioning
- WaitForUserUpload
- Ready
- Failed
- Terminating
- ImageLost
type: string
progress:
description:
Expand Down
1 change: 1 addition & 0 deletions crds/doc-ru-clustervirtualimages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ spec:
* `WaitForUserUpload` - ожидание загрузки образа пользователем. Путь для загрузки образа указывается в `.status.uploadCommand`;
* `Ready` - ресурс создан и готов к использованию;
* `Failed` - при создании ресурса произошла ошибка;
* `ImageLost` — образ отсутствует в DVCR. Ресурс не может быть использован;
* `Terminating` - ресурс находится в процессе удаления.
progress:
description: |
Expand Down
1 change: 1 addition & 0 deletions crds/doc-ru-virtualimages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ spec:
* `WaitForUserUpload` — ожидание загрузки образа пользователем. Путь для загрузки образа указывается в `.status.uploadCommand`;
* `Ready` — ресурс создан и готов к использованию;
* `Failed` — при создании ресурса возникла ошибка. За подробностями обратитесь к полям `.status.failureReason` и `.status.failureMessage`;
* `ImageLost` — образ отсутствует в DVCR. Ресурс не может быть использован;
* `PVCLost` — дочерний PVC ресурса отсутствует. Ресурс не может быть использован;
* `Terminating` - ресурс находится в процессе удаления.
progress:
Expand Down
2 changes: 2 additions & 0 deletions crds/virtualimages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ spec:
* `Ready`: The resource has been created and is ready to use.
* `Failed`: There was an error when creating the resource.
* `Terminating`: The resource is being deleted.
* `ImageLost`: The image is missing in DVCR. The resource cannot be used.
* `PVCLost`: The child PVC of the resource is missing. The resource cannot be used.
enum:
- Pending
Expand All @@ -370,6 +371,7 @@ spec:
- Ready
- Failed
- Terminating
- ImageLost
- PVCLost
type: string
progress:
Expand Down
49 changes: 25 additions & 24 deletions images/hooks/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ require (
github.com/onsi/gomega v1.36.1
github.com/tidwall/gjson v1.18.0
golang.org/x/crypto v0.38.0
k8s.io/api v0.33.3
k8s.io/apimachinery v0.33.3
k8s.io/api v0.34.2
k8s.io/apimachinery v0.34.2
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
)

Expand All @@ -25,28 +25,29 @@ require (
github.com/caarlos0/env/v11 v11.2.2 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cloudflare/cfssl v1.6.5 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/cli v27.1.1+incompatible // indirect
github.com/docker/cli v28.2.2+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker-credential-helpers v0.8.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/docker/docker-credential-helpers v0.9.3 // indirect
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
github.com/ettle/strcase v0.2.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-openapi/jsonpointer v0.21.1 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.1 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/gojuno/minimock/v3 v3.4.5 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/certificate-transparency-go v1.1.7 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/go-containerregistry v0.17.0 // indirect
github.com/google/go-containerregistry v0.20.3 // indirect
github.com/google/go-containerregistry/pkg/authn/kubernetes v0.0.0-20251113035405-7471efdf9871 // indirect
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
Expand All @@ -55,10 +56,10 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mailru/easyjson v0.9.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
Expand All @@ -77,42 +78,42 @@ require (
github.com/sylabs/oci-tools v0.7.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/vbatts/tar-split v0.11.3 // indirect
github.com/vbatts/tar-split v0.11.6 // indirect
github.com/weppos/publicsuffix-go v0.30.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/zmap/zcrypto v0.0.0-20230310154051-c8b263fd8300 // indirect
github.com/zmap/zlint/v3 v3.5.0 // indirect
go.opentelemetry.io/otel v1.33.0 // indirect
go.opentelemetry.io/otel/trace v1.33.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v3 v3.0.3 // indirect
golang.org/x/net v0.39.0 // indirect
golang.org/x/oauth2 v0.27.0 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/net v0.40.0 // indirect
golang.org/x/oauth2 v0.30.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/term v0.32.0 // indirect
golang.org/x/text v0.25.0 // indirect
golang.org/x/time v0.9.0 // indirect
golang.org/x/time v0.11.0 // indirect
golang.org/x/tools v0.32.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/protobuf v1.36.5 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.33.3 // indirect
k8s.io/apiserver v0.33.3 // indirect
k8s.io/client-go v0.33.3 // indirect
k8s.io/client-go v0.34.2 // indirect
k8s.io/component-base v0.33.3 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20250701173324-9bd5c66d9911 // indirect
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
kubevirt.io/api v1.3.1 // indirect
kubevirt.io/containerized-data-importer-api v1.60.3 // indirect
kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 // indirect
sigs.k8s.io/controller-runtime v0.21.0 // indirect
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
)

replace (
Expand Down
Loading
Loading