Skip to content

Commit

Permalink
make boot disk required
Browse files Browse the repository at this point in the history
  • Loading branch information
lubedacht committed Jan 12, 2024
1 parent a5fef56 commit 3f1d056
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions api/v1alpha1/ionoscloudmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ type IonosCloudMachineSpec struct {
CPUFamily string `json:"cpuFamily"`

// Disk defines the boot volume of the VM.
// +optional
Disk *Volume `json:"disk,omitempty"`
Disk Volume `json:"disk"`

// Network defines the network configuration for the VM.
Network *Network `json:"network,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/ionoscloudmachine_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var _ = Describe("IonosCloudMachine Tests", func() {
Context("Validation", func() {
It("Should set defaults for Volumes", func() {
m := defaultMachine()
m.Spec.Disk = &Volume{
m.Spec.Disk = Volume{
Name: "test-volume",
SizeGB: 5,
}
Expand Down Expand Up @@ -88,7 +88,7 @@ var _ = Describe("IonosCloudMachine Tests", func() {

It("Should fail if size is less than 5", func() {
m := defaultMachine()
m.Spec.Disk = &Volume{
m.Spec.Disk = Volume{
Name: "test-volume",
SizeGB: 4,
}
Expand Down
6 changes: 1 addition & 5 deletions api/v1alpha1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ spec:
- availabilityZone
- cpuFamily
- datacenterId
- disk
- numCores
type: object
status:
Expand Down

0 comments on commit 3f1d056

Please sign in to comment.