Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow diskSetup to include partition layout #8524

Open
Xartos opened this issue Apr 13, 2023 · 8 comments · May be fixed by #11634
Open

Allow diskSetup to include partition layout #8524

Xartos opened this issue Apr 13, 2023 · 8 comments · May be fixed by #11634
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@Xartos
Copy link

Xartos commented Apr 13, 2023

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.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 13, 2023
@fabriziopandini
Copy link
Member

/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

@k8s-ci-robot
Copy link
Contributor

@fabriziopandini:
This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

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.

In response to this:

/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

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 14, 2023
@ansh-wal
Copy link

@fabriziopandini I can pick this up.

@sbueringer
Copy link
Member

sbueringer commented Apr 22, 2023

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)

@sbdtu5498 sbdtu5498 removed their assignment Jun 12, 2023
AshleyDumaine added a commit to linode/cluster-api-provider-linode that referenced this issue Feb 26, 2024
@fabriziopandini
Copy link
Member

/priority backlog

@miltalex
Copy link

miltalex commented Oct 1, 2024

@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.

@sbueringer
Copy link
Member

sbueringer commented Oct 2, 2024

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

@JoelSpeed
Copy link
Contributor

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)

@miltalex miltalex linked a pull request Jan 2, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants