Skip to content

Commit

Permalink
Make providerID in NutanixMachine spec optional (#447)
Browse files Browse the repository at this point in the history
* Make `providerID` an optional type in NutanixMachineSpec

* Remove dummy providerID from clusterclass templates
  • Loading branch information
thunderboltsid authored Jun 7, 2024
1 parent d5f36c9 commit a3cd368
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 3 additions & 1 deletion api/v1beta1/nutanixmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ type NutanixMachineSpec struct {
// SPEC FIELDS - desired state of NutanixMachine
// Important: Run "make" to regenerate code after modifying this file

ProviderID string `json:"providerID"`
// ProviderID is the unique identifier as specified by the cloud provider.
// +optional
ProviderID string `json:"providerID,omitempty"`
// vcpusPerSocket is the number of vCPUs per socket of the VM
// +kubebuilder:validation:Required
// +kubebuilder:validation:Minimum=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@ spec:
- type
type: object
providerID:
description: ProviderID is the unique identifier as specified by the
cloud provider.
type: string
subnet:
description: subnet is to identify the cluster's network subnet to
Expand Down Expand Up @@ -587,7 +589,6 @@ spec:
required:
- image
- memorySize
- providerID
- systemDiskSize
- vcpuSockets
- vcpusPerSocket
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,8 @@ spec:
- type
type: object
providerID:
description: ProviderID is the unique identifier as specified
by the cloud provider.
type: string
subnet:
description: subnet is to identify the cluster's network subnet
Expand Down Expand Up @@ -527,7 +529,6 @@ spec:
required:
- image
- memorySize
- providerID
- systemDiskSize
- vcpuSockets
- vcpusPerSocket
Expand Down
2 changes: 0 additions & 2 deletions templates/cluster-template-clusterclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,6 @@ spec:
name: ""
type: name
memorySize: 4Gi
providerID: nutanix://vm-uuid
subnet:
- name: ""
type: name
Expand All @@ -739,7 +738,6 @@ spec:
name: ""
type: name
memorySize: 4Gi
providerID: nutanix://vm-uuid
subnet:
- name: ""
type: name
Expand Down
1 change: 0 additions & 1 deletion templates/clusterclass/nmt-cp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ metadata:
spec:
template:
spec:
providerID: "nutanix://vm-uuid"
# Supported options for boot type: legacy and uefi
# Defaults to legacy if not set
bootType: legacy
Expand Down
1 change: 0 additions & 1 deletion templates/clusterclass/nmt-md.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ metadata:
spec:
template:
spec:
providerID: "nutanix://vm-uuid"
# Supported options for boot type: legacy and uefi
# Defaults to legacy if not set
bootType: legacy
Expand Down

0 comments on commit a3cd368

Please sign in to comment.