Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expose ability to skip vsphere guest conversion #1279

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion pkg/apis/forklift/v1beta1/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
5 changes: 5 additions & 0 deletions pkg/apis/forklift/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading