diff --git a/operator/config/crd/bases/forklift.konveyor.io_providers.yaml b/operator/config/crd/bases/forklift.konveyor.io_providers.yaml index 4ac2ab6b1..e3cb9034b 100644 --- a/operator/config/crd/bases/forklift.konveyor.io_providers.yaml +++ b/operator/config/crd/bases/forklift.konveyor.io_providers.yaml @@ -60,6 +60,9 @@ spec: spec: description: Defines the desired state of Provider. properties: + convertDisk: + description: Whether or not the Guest OS should be converted + type: boolean secret: description: |- References a secret containing credentials and diff --git a/pkg/apis/forklift/v1beta1/provider.go b/pkg/apis/forklift/v1beta1/provider.go index 7227d58e4..9a1ca7b86 100644 --- a/pkg/apis/forklift/v1beta1/provider.go +++ b/pkg/apis/forklift/v1beta1/provider.go @@ -79,6 +79,8 @@ type ProviderSpec struct { Secret core.ObjectReference `json:"secret" ref:"Secret"` // Provider settings. Settings map[string]string `json:"settings,omitempty"` + // Whether or not the Guest OS should be converted + ConvertDisk *bool `json:"convertDisk,omitempty"` } // ProviderStatus defines the observed state of Provider @@ -145,5 +147,8 @@ func (p *Provider) HasReconciled() bool { // This provider requires VM guest conversion. func (p *Provider) RequiresConversion() bool { - return p.Type() == VSphere || p.Type() == Ova + if p.Spec.ConvertDisk == nil { + return p.Type() == VSphere || p.Type() == Ova + } + return *p.Spec.ConvertDisk } diff --git a/pkg/apis/forklift/v1beta1/zz_generated.deepcopy.go b/pkg/apis/forklift/v1beta1/zz_generated.deepcopy.go index f078c1050..a831f7a87 100644 --- a/pkg/apis/forklift/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/forklift/v1beta1/zz_generated.deepcopy.go @@ -837,6 +837,11 @@ func (in *ProviderSpec) DeepCopyInto(out *ProviderSpec) { (*out)[key] = val } } + if in.ConvertDisk != nil { + in, out := &in.ConvertDisk, &out.ConvertDisk + *out = new(bool) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderSpec.