Skip to content

Commit 235af63

Browse files
Proposal for adding Additional Disks to node
1 parent ba718cd commit 235af63

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/proposal/additional-disks.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Adding additional volumes to Nodes
2+
3+
[Github Issue](https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/issues/1920)
4+
5+
## Summary
6+
We want the ability to add additional Volumes to our Machine nodes.
7+
8+
## Proposal
9+
We will need to make changes to both the API and the controller logic.
10+
With regards to the API, we will need to add a new `AdditionalVolumes` field to the Machine Spec to contain all the different volumes that are added to the node, the field will be a slice of type `VPCVolume`. As an initial design we can keep the field [append-only](https://kubernetes.io/blog/2022/09/29/enforce-immutability-using-cel/#append-only-list-of-containers).
11+
12+
The flow for creating Additional Volumes will be similar to creating the Boot Volume.
13+
We will need to add checks in the admission and mutation webhooks to validate any changes to the field like we do for `VPCVolume`.
14+
We can allow the field be unset initially so if a user wants to add Volumes after provisioning a machine, they will be able to.
15+
16+
The Machine create flow will be as follows:
17+
If a user does not add Additional Volumes while creating the Machine, the standard create flow will be followed.
18+
If they add Additional Volumes when creating the Machine, the Machine reconciler will also create the Additional Volumes and attach them to the machine.
19+
20+
The Machine update flow will be as follows:
21+
The `AdditionalVolumes` field will be append-only so a user will not be able to remove already created volumes. If a user adds more volumes to the slice, those Volumes will be provisioned and then attached to the machine.
22+
23+
The Delete flow will not change much, the Additional Volumes' deletion flow will be similar to the Boot Volume's.

0 commit comments

Comments
 (0)