mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 06:16:08 -04:00
Add configurable node disk type (#317)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
6a84bb5b4b
commit
aa7fcce8af
7 changed files with 69 additions and 21 deletions
|
@ -19,6 +19,7 @@ func (c *Client) CreateInstances(ctx context.Context, input CreateInstancesInput
|
|||
Count: input.CountWorkers,
|
||||
InstanceType: input.InstanceType,
|
||||
StateDiskSizeGB: int32(input.StateDiskSizeGB),
|
||||
StateDiskType: input.StateDiskType,
|
||||
Image: input.Image,
|
||||
UserAssingedIdentity: input.UserAssingedIdentity,
|
||||
LoadBalancerBackendAddressPool: azure.BackendAddressPoolWorkerName + "-" + c.uid,
|
||||
|
@ -37,6 +38,7 @@ func (c *Client) CreateInstances(ctx context.Context, input CreateInstancesInput
|
|||
Count: input.CountControlPlanes,
|
||||
InstanceType: input.InstanceType,
|
||||
StateDiskSizeGB: int32(input.StateDiskSizeGB),
|
||||
StateDiskType: input.StateDiskType,
|
||||
Image: input.Image,
|
||||
UserAssingedIdentity: input.UserAssingedIdentity,
|
||||
LoadBalancerBackendAddressPool: azure.BackendAddressPoolControlPlaneName + "-" + c.uid,
|
||||
|
@ -70,6 +72,7 @@ type CreateInstancesInput struct {
|
|||
CountControlPlanes int
|
||||
InstanceType string
|
||||
StateDiskSizeGB int
|
||||
StateDiskType string
|
||||
Image string
|
||||
UserAssingedIdentity string
|
||||
}
|
||||
|
@ -175,6 +178,7 @@ func (c *Client) createScaleSet(ctx context.Context, input CreateScaleSetInput)
|
|||
Location: c.location,
|
||||
InstanceType: input.InstanceType,
|
||||
StateDiskSizeGB: input.StateDiskSizeGB,
|
||||
StateDiskType: input.StateDiskType,
|
||||
Count: int64(input.Count),
|
||||
Username: "constellation",
|
||||
SubnetID: c.subnetID,
|
||||
|
@ -254,6 +258,7 @@ type CreateScaleSetInput struct {
|
|||
Count int
|
||||
InstanceType string
|
||||
StateDiskSizeGB int32
|
||||
StateDiskType string
|
||||
Image string
|
||||
UserAssingedIdentity string
|
||||
LoadBalancerBackendAddressPool string
|
||||
|
|
|
@ -17,6 +17,7 @@ type ScaleSet struct {
|
|||
Location string
|
||||
InstanceType string
|
||||
StateDiskSizeGB int32
|
||||
StateDiskType string
|
||||
Count int64
|
||||
Username string
|
||||
SubnetID string
|
||||
|
@ -62,6 +63,9 @@ func (s ScaleSet) Azure() armcompute.VirtualMachineScaleSet {
|
|||
CreateOption: armcompute.DiskCreateOptionTypesEmpty.ToPtr(),
|
||||
DiskSizeGB: to.Int32Ptr(s.StateDiskSizeGB),
|
||||
Lun: to.Int32Ptr(0),
|
||||
ManagedDisk: &armcompute.VirtualMachineScaleSetManagedDiskParameters{
|
||||
StorageAccountType: (*armcompute.StorageAccountTypes)(to.StringPtr(s.StateDiskType)),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue