@@ -184,6 +184,9 @@ type NodePoolStatus struct {
184184 // +kubebuilder:validation:Optional
185185 Version string `json:"version,omitempty"`
186186
187+ // Platform hols the specific statuses
188+ Platform * NodePoolPlatformStatus `json:"platform,omitempty"`
189+
187190 // Conditions represents the latest available observations of the node pool's
188191 // current state.
189192 // +optional
@@ -552,6 +555,26 @@ type KubevirtPersistentVolume struct {
552555 AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty"`
553556}
554557
558+ // KubevirtCachingStrategyType is the type of the boot image caching mechanism for the KubeVirt provider
559+ type KubevirtCachingStrategyType string
560+
561+ const (
562+ // KubevirtCachingStrategyNone means that hypershift will not cache the boot image
563+ KubevirtCachingStrategyNone KubevirtCachingStrategyType = "None"
564+
565+ // KubevirtCachingStrategyPVC means that hypershift will cache the boot image into a PVC; only relevant when using
566+ // a QCOW boot image, and is ignored when using a container image
567+ KubevirtCachingStrategyPVC KubevirtCachingStrategyType = "PVC"
568+ )
569+
570+ // KubevirtCachingStrategy defines the boot image caching strategy
571+ type KubevirtCachingStrategy struct {
572+ // Type is the type of the caching strategy
573+ // +kubebuilder:default=None
574+ // +kubebuilder:validation:Enum=None;PVC
575+ Type KubevirtCachingStrategyType `json:"type"`
576+ }
577+
555578// KubevirtRootVolume represents the volume that the rhcos disk will be stored and run from.
556579type KubevirtRootVolume struct {
557580 // Image represents what rhcos image to use for the node pool
@@ -561,6 +584,10 @@ type KubevirtRootVolume struct {
561584
562585 // KubevirtVolume represents of type of storage to run the image on
563586 KubevirtVolume `json:",inline"`
587+
588+ // CacheStrategy defines the boot image caching strategy. Default - no caching
589+ // +optional
590+ CacheStrategy * KubevirtCachingStrategy `json:"cacheStrategy,omitempty"`
564591}
565592
566593// KubevirtVolumeType is a specific supported KubeVirt volumes
@@ -790,6 +817,24 @@ type NodePoolCondition struct {
790817 ObservedGeneration int64 `json:"observedGeneration,omitempty"`
791818}
792819
820+ // NodePoolPlatformStatus contains specific platform statuses
821+ type NodePoolPlatformStatus struct {
822+ // KubeVirt contains the KubeVirt platform statuses
823+ // +optional
824+ KubeVirt * KubeVirtNodePoolStatus `json:"kubeVirt,omitempty"`
825+ }
826+
827+ // KubeVirtNodePoolStatus contains the KubeVirt platform statuses
828+ type KubeVirtNodePoolStatus struct {
829+ // CacheName holds the name of the cache DataVolume, if exists
830+ // +optional
831+ CacheName string `json:"cacheName,omitempty"`
832+
833+ // RemoteNamespace holds the namespace of the remote infra cluster, if defined
834+ // +optional
835+ RemoteNamespace string `json:"remoteNamespace,omitempty"`
836+ }
837+
793838// Taint is as v1 Core but without TimeAdded.
794839// https://github.com/kubernetes/kubernetes/blob/ed8cad1e80d096257921908a52ac69cf1f41a098/staging/src/k8s.io/api/core/v1/types.go#L3037-L3053
795840type Taint struct {
0 commit comments