Skip to content
Open
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
4 changes: 4 additions & 0 deletions api/v1alpha3/maasmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ type MaasMachineSpec struct {
// +optional
MinMemory *int `json:"minMemory,omitempty"`

// Storage will be the MaaS Machine's storage configuration.
// +optional
Storage *string `json:"storage,omitempty"`

// Image will be the MaaS image id
Image string `json:"image"`
}
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha3/zz_generated.deepcopy.go

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

4 changes: 4 additions & 0 deletions api/v1alpha4/maasmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ type MaasMachineSpec struct {
// +kubebuilder:validation:Minimum=0
MinMemoryInMB *int `json:"minMemory"`

// Storage will be the MaaS Machine's storage configuration.
// +optional
Storage *string `json:"storage,omitempty"`

// Image will be the MaaS image id
// +kubebuilder:validation:MinLength=1
Image string `json:"image"`
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha4/zz_generated.deepcopy.go

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

4 changes: 4 additions & 0 deletions api/v1beta1/maasmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ type MaasMachineSpec struct {
// +kubebuilder:validation:Minimum=0
MinMemoryInMB *int `json:"minMemory"`

// Storage will be the MaaS Machine's storage configuration.
// +optional
Storage *string `json:"storage,omitempty"`

// Image will be the MaaS image id
// +kubebuilder:validation:MinLength=1
Image string `json:"image"`
Expand Down
5 changes: 5 additions & 0 deletions api/v1beta1/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 @@ -58,6 +58,9 @@ spec:
resourcePool:
description: ResourcePool will be the MAAS Machine resourcepool
type: string
storage:
description: Storage will be the MaaS Machine's storage configuration.
type: string
systemID:
description: SystemID will be the MaaS machine ID
type: string
Expand Down Expand Up @@ -208,6 +211,9 @@ spec:
resourcePool:
description: ResourcePool will be the MAAS Machine resourcepool
type: string
storage:
description: Storage will be the MaaS Machine's storage configuration.
type: string
systemID:
description: SystemID will be the MaaS machine ID
type: string
Expand Down Expand Up @@ -360,6 +366,9 @@ spec:
resourcePool:
description: ResourcePool will be the MAAS Machine resourcepool
type: string
storage:
description: Storage will be the MaaS Machine's storage configuration.
type: string
systemID:
description: SystemID will be the MaaS machine ID
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ spec:
resourcePool:
description: ResourcePool will be the MAAS Machine resourcepool
type: string
storage:
description: Storage will be the MaaS Machine's storage configuration.
type: string
systemID:
description: SystemID will be the MaaS machine ID
type: string
Expand Down Expand Up @@ -136,6 +139,9 @@ spec:
resourcePool:
description: ResourcePool will be the MAAS Machine resourcepool
type: string
storage:
description: Storage will be the MaaS Machine's storage configuration.
type: string
systemID:
description: SystemID will be the MaaS machine ID
type: string
Expand Down Expand Up @@ -208,6 +214,9 @@ spec:
resourcePool:
description: ResourcePool will be the MAAS Machine resourcepool
type: string
storage:
description: Storage will be the MaaS Machine's storage configuration.
type: string
systemID:
description: SystemID will be the MaaS machine ID
type: string
Expand Down
4 changes: 4 additions & 0 deletions pkg/maas/machine/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ func (s *Service) DeployMachine(userDataB64 string) (_ *infrav1beta1.Machine, re
allocator.WithResourcePool(*mm.Spec.ResourcePool)
}

if mm.Spec.Storage != nil {
allocator.WithStorage(*mm.Spec.Storage)
}

m, err = allocator.Allocate(ctx)
if err != nil {
return nil, errors.Wrapf(err, "Unable to allocate machine")
Expand Down