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 configuration of max snapshots during install #851

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

anmazzotti
Copy link
Contributor

@anmazzotti anmazzotti commented Sep 24, 2024

Depends on rancher/elemental-toolkit#2193

apiVersion: elemental.cattle.io/v1beta1
kind: MachineRegistration
metadata:
  name: fire-nodes
  namespace: fleet-default
spec:
    elemental:
      install:
        snapshotter:
          type: btrfs
          maxSnaps: 2

Note that the default (and minimum value) now is 2. This differs from the previous 4 for btrfs snapshotter (was driven toolkit side).

Also note that this covers install phase only.
I considered implementing it for reset as well, however since you will actually be able to define a different snapshotter config on reset, this will make machine drift in behavior, depending if they are freshly provisioned or reset, which is not desirable imho.

Changing snapshotter type on reset also has consequences, for example switching from btrfs to loopdevice will have serious effects on partition sizes. Changing the amount of maxSnaps will also affect space available, and repartitioning is something we do not support on reset.

@anmazzotti anmazzotti requested a review from a team as a code owner September 24, 2024 14:32
@anmazzotti anmazzotti self-assigned this Sep 24, 2024
@github-actions github-actions bot added the area/operator operator related changes label Sep 24, 2024
Copy link
Contributor

@davidcassany davidcassany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anmazzotti anmazzotti merged commit 3df501d into rancher:main Sep 25, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/operator operator related changes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants