Skip to content

Commit 6916abf

Browse files
committed
alternative mp datadisk design
1 parent dcd6095 commit 6916abf

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

pkg/asset/ignition/machine/master.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ func (a *Master) Generate(_ context.Context, dependencies asset.Parents) error {
6060
// platform specific...
6161
if installConfig.Config.ControlPlane.Platform.Azure != nil {
6262
azurePlatform := installConfig.Config.ControlPlane.Platform.Azure
63-
device := fmt.Sprintf("/dev/disk/azure/scsi1/lun%d", azurePlatform.DataDisks[i].Lun)
64-
65-
AddEtcdDisk(a.Config, device)
63+
if d.Etcd.PlatformDiskID == azurePlatform.DataDisks[i].NameSuffix {
64+
device := fmt.Sprintf("/dev/disk/azure/scsi1/lun%d", *azurePlatform.DataDisks[i].Lun)
65+
AddEtcdDisk(a.Config, device)
66+
}
6667
}
6768
}
6869
}

pkg/types/machinepools.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,21 @@ const (
6060

6161
type DataDisk struct {
6262
Type DataDiskType `json:"type,omitempty"`
63+
64+
UserDefined *DiskUserDefined `json:"userDefined,omitempty"`
65+
Etcd *DiskEtcd `json:"etcd,omitempty"`
66+
Swap *DiskSwap `json:"swap,omitempty"`
67+
}
68+
69+
type DiskUserDefined struct {
70+
PlatformDiskID string `json:"platformDiskID,omitempty"`
71+
MountPath string `json:"mountPath,omitempty"`
72+
}
73+
type DiskSwap struct {
74+
PlatformDiskID string `json:"platformDiskID,omitempty"`
75+
}
76+
type DiskEtcd struct {
77+
PlatformDiskID string `json:"platformDiskID,omitempty"`
6378
}
6479

6580
// MachinePool is a pool of machines to be installed.

0 commit comments

Comments
 (0)