Skip to content

Commit

Permalink
Add powerOffMode to templates
Browse files Browse the repository at this point in the history
  • Loading branch information
laozc committed Aug 3, 2023
1 parent 2fae0a9 commit ad61a31
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packaging/flavorgen/flavors/generators.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ func newVSphereMachineTemplate(templateName string) infrav1.VSphereMachineTempla
func defaultVirtualMachineSpec() infrav1.VSphereMachineSpec {
return infrav1.VSphereMachineSpec{
VirtualMachineCloneSpec: defaultVirtualMachineCloneSpec(),
PowerOffMode: infrav1.VirtualMachinePowerOpModeHard,
}
}

Expand Down Expand Up @@ -311,6 +312,7 @@ func newNodeIPAMVSphereMachineTemplate(templateName string) infrav1.VSphereMachi
func nodeIPAMVirtualMachineSpec() infrav1.VSphereMachineSpec {
return infrav1.VSphereMachineSpec{
VirtualMachineCloneSpec: nodeIPAMVirtualMachineCloneSpec(),
PowerOffMode: infrav1.VirtualMachinePowerOpModeHard,
}
}

Expand Down
2 changes: 2 additions & 0 deletions templates/cluster-template-external-loadbalancer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ spec:
networkName: '${VSPHERE_NETWORK}'
numCPUs: 2
os: Linux
powerOffMode: hard
resourcePool: '${VSPHERE_RESOURCE_POOL}'
server: '${VSPHERE_SERVER}'
storagePolicyName: '${VSPHERE_STORAGE_POLICY}'
Expand All @@ -81,6 +82,7 @@ spec:
networkName: '${VSPHERE_NETWORK}'
numCPUs: 2
os: Linux
powerOffMode: hard
resourcePool: '${VSPHERE_RESOURCE_POOL}'
server: '${VSPHERE_SERVER}'
storagePolicyName: '${VSPHERE_STORAGE_POLICY}'
Expand Down
1 change: 1 addition & 0 deletions templates/cluster-template-ignition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ spec:
networkName: '${VSPHERE_NETWORK}'
numCPUs: 2
os: Linux
powerOffMode: hard
resourcePool: '${VSPHERE_RESOURCE_POOL}'
server: '${VSPHERE_SERVER}'
storagePolicyName: '${VSPHERE_STORAGE_POLICY}'
Expand Down
2 changes: 2 additions & 0 deletions templates/cluster-template-node-ipam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ spec:
networkName: '${VSPHERE_NETWORK}'
numCPUs: 2
os: Linux
powerOffMode: hard
resourcePool: '${VSPHERE_RESOURCE_POOL}'
server: '${VSPHERE_SERVER}'
storagePolicyName: '${VSPHERE_STORAGE_POLICY}'
Expand Down Expand Up @@ -91,6 +92,7 @@ spec:
networkName: '${VSPHERE_NETWORK}'
numCPUs: 2
os: Linux
powerOffMode: hard
resourcePool: '${VSPHERE_RESOURCE_POOL}'
server: '${VSPHERE_SERVER}'
storagePolicyName: '${VSPHERE_STORAGE_POLICY}'
Expand Down
2 changes: 2 additions & 0 deletions templates/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ spec:
networkName: '${VSPHERE_NETWORK}'
numCPUs: 2
os: Linux
powerOffMode: hard
resourcePool: '${VSPHERE_RESOURCE_POOL}'
server: '${VSPHERE_SERVER}'
storagePolicyName: '${VSPHERE_STORAGE_POLICY}'
Expand All @@ -81,6 +82,7 @@ spec:
networkName: '${VSPHERE_NETWORK}'
numCPUs: 2
os: Linux
powerOffMode: hard
resourcePool: '${VSPHERE_RESOURCE_POOL}'
server: '${VSPHERE_SERVER}'
storagePolicyName: '${VSPHERE_STORAGE_POLICY}'
Expand Down
2 changes: 2 additions & 0 deletions templates/clusterclass-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ spec:
networkName: '${VSPHERE_NETWORK}'
numCPUs: 2
os: Linux
powerOffMode: hard
resourcePool: '${VSPHERE_RESOURCE_POOL}'
server: '${VSPHERE_SERVER}'
storagePolicyName: '${VSPHERE_STORAGE_POLICY}'
Expand All @@ -204,6 +205,7 @@ spec:
networkName: '${VSPHERE_NETWORK}'
numCPUs: 2
os: Linux
powerOffMode: hard
resourcePool: '${VSPHERE_RESOURCE_POOL}'
server: '${VSPHERE_SERVER}'
storagePolicyName: '${VSPHERE_STORAGE_POLICY}'
Expand Down

0 comments on commit ad61a31

Please sign in to comment.