Skip to content
Merged
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
3 changes: 3 additions & 0 deletions api/holodeck/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ type Instance struct {
IngressIpRanges []string `json:"ingressIpRanges"`
// +optional
HostUrl string `json:"hostUrl"`
// +optional
// if not set, the default size is 64GB
RootVolumeSizeGB *int32 `json:"rootVolumeSizeGB"`
}

// Describes an image or vm template.
Expand Down
5 changes: 5 additions & 0 deletions api/holodeck/v1alpha1/zz_generated.deepcopy.go

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

5 changes: 5 additions & 0 deletions pkg/provider/aws/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,11 @@ func (p *Provider) createEC2Instance(cache *AWS) error {
return fmt.Errorf("error getting AMI: %w", err)
}

// if the root volume size is not set, use the default size
if p.Spec.RootVolumeSizeGB != nil {
storageSizeGB = *p.Spec.RootVolumeSizeGB
}

instanceIn := &ec2.RunInstancesInput{
ImageId: p.Spec.Image.ImageId,
InstanceType: types.InstanceType(p.Spec.Type),
Expand Down
Loading