Open Xartos opened 1 year ago
/triage accepted defining a field that can be either a list or a boolean requires some work in golang, but it is something that we can explore
/help
@fabriziopandini: This request has been marked as needing help from a contributor.
Please ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help
command.
@fabriziopandini I can pick this up.
I'm not sure if we can make this work without a breaking change to our go API structs (which would mean we have to wait until v1beta2)
/priority backlog
@fabriziopandini I was curious if that is something that can be done now, or there are still blockers? I would like to have a look into it when I find a bit of time.
To the best of my knowledge bool or list is not possible with crds (https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#intorstring cc @JoelSpeed). So I think we have to express this in a different way in our crd
Also seems like the list has different types in it
layout:
- [33,82]
- 66
I think that's also not supported in CRDs
Yeah that wouldn't be a structural schema, but you could represent the choices in a kube like way using a discriminated union, the yaml version would look something like:
diskLayout:
type: Unpartitioned | SinglePartition | Custom
custom:
- sizePercentage: 0 < int < 100
partitionType: int (? Looking at the docs I think this is an int but not sure)
What would you like to be added (User Story)?
As a cluster administrator I would like to be able to setup nodes that has a single disk with multiple partitions
Detailed Description
Currently there's no way to have a single node VM and split its disk into multiple partitions since this field is only a boolean. However, the cloud-init documentation says that this can either be a bool (to set up the disk as a single partition) or a list that describes the partition layout, reference.
So my proposal would be to allow this field to be either a boolean or a list. Alternatively add another field that describes the layout that can be merged with the existing field when generating the cloud-init user-data file.
Anything else you would like to add?
No response
Label(s) to be applied
/kind feature One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels.