Skip to content

Commit

Permalink
Revert OS type change
Browse files Browse the repository at this point in the history
  • Loading branch information
Gab Satchi committed Dec 3, 2020
1 parent f75cf9c commit 6f7d9fd
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 35 deletions.
15 changes: 0 additions & 15 deletions api/v1alpha3/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,6 @@ const (
LinkedClone CloneMode = "linkedClone"
)

// OS is the type of Operating System the virtual machine uses
type OS string

const (
// Linux indicates the VM uses a Linux Operating System
Linux OS = "Linux"

// Windows indicates the VM uses Windows Server 2019 as the OS
Windows OS = "Windows"
)

// VirtualMachineCloneSpec is information used to clone a virtual machine.
type VirtualMachineCloneSpec struct {
// Template is the name or inventory path of the template used to clone
Expand Down Expand Up @@ -133,10 +122,6 @@ type VirtualMachineCloneSpec struct {
// virtual machine is cloned.
// +optional
DiskGiB int32 `json:"diskGiB,omitempty"`
// OS is the Operating System of the virtual machine
// Defaults to Linux
// +optional
OS OS `json:"os,omitempty"`
}

// VSphereMachineTemplateResource describes the data needed to create a VSphereMachine from a template
Expand Down
1 change: 0 additions & 1 deletion api/v1alpha3/vspherevm_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func (r *VSphereVM) ValidateCreate() error {
}
}
}

return aggregateObjErrors(r.GroupVersionKind().GroupKind(), r.Name, allErrs)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,6 @@ spec:
value in the template from which the virtual machine is cloned.
format: int32
type: integer
os:
description: OS is the Operating System of the virtual machine
Defaults to Linux
type: string
resourcePool:
description: ResourcePool is the name or inventory path of the
resource pool in which the virtual machine is created/located.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,6 @@ spec:
value in the template from which the virtual machine is cloned.
format: int32
type: integer
os:
description: OS is the Operating System of the virtual machine Defaults
to Linux
type: string
providerID:
description: ProviderID is the virtual machine's BIOS UUID formated
as vsphere://12345678-1234-1234-1234-123456789abc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,6 @@ spec:
virtual machine is cloned.
format: int32
type: integer
os:
description: OS is the Operating System of the virtual machine
Defaults to Linux
type: string
providerID:
description: ProviderID is the virtual machine's BIOS UUID
formated as vsphere://12345678-1234-1234-1234-123456789abc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,6 @@ spec:
value in the template from which the virtual machine is cloned.
format: int32
type: integer
os:
description: OS is the Operating System of the virtual machine Defaults
to Linux
type: string
resourcePool:
description: ResourcePool is the name or inventory path of the resource
pool in which the virtual machine is created/located.
Expand Down
4 changes: 1 addition & 3 deletions packaging/flavorgen/flavors/generators.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ func newVSphereLinuxMachineTemplate() infrav1.VSphereMachineTemplate {

func newVSphereWindowsMachineTemplate() infrav1.VSphereMachineTemplate {
spec := defaultVirtualMachineSpec()
spec.OS = infrav1.Windows
spec.Template = vSphereTemplateWindowsVar
spec.DiskGiB = defaultWindowsDiskGiB
return infrav1.VSphereMachineTemplate{
Expand Down Expand Up @@ -298,7 +297,6 @@ func defaultVirtualMachineCloneSpec() infrav1.VirtualMachineCloneSpec {
ResourcePool: vSphereResourcePoolVar,
Datastore: vSphereDatastoreVar,
Folder: vSphereFolderVar,
OS: infrav1.Linux,
}
}

Expand Down Expand Up @@ -383,7 +381,7 @@ func windowsNodeRegistrationOptions() kubeadmv1beta1.NodeRegistrationOptions {
return kubeadmv1beta1.NodeRegistrationOptions{
Name: "{{ ds.meta_data.hostname }}",
KubeletExtraArgs: defaultExtraArgs(),
Taints: []v1.Taint{{Key: "windows", Value: "2019", Effect: v1.TaintEffectNoSchedule}},
Taints: []v1.Taint{{Key: "windows", Value: "2019", Effect: v1.TaintEffectNoSchedule}},
}
}

Expand Down

0 comments on commit 6f7d9fd

Please sign in to comment.