⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@eshulman2
Copy link
Contributor

Enables creating bootable volumes from images by adding an imageRef
field to the Volume spec. When specified, the volume is created with
the image baked in, making it suitable for boot-from-volume scenarios.

Changes:

  • Add imageRef field to VolumeResourceSpec
  • Add bootable and imageID fields to VolumeResourceStatus
  • Add image dependency with deletion guard
  • Add kuttl tests for bootable volume creation

assisted-by: claude

@github-actions github-actions bot added the semver:minor Backwards-compatible change label Jan 8, 2026
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe this test is not necessary because we're already checking the creation of a bootable volume in the volume-dependency test. We will also use bootable volumes when testing for servers booted from volumes soon. What do you say we drop the volume-create-bootable test?

Copy link
Contributor Author

@eshulman2 eshulman2 Jan 15, 2026

Choose a reason for hiding this comment

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

I think we should leave this one and remove the dependency as there is no deletion guard for image so I feel it would make more sense keeping this and removing the dependency, WDYT?

managementPolicy: managed
resource:
size: 1
---
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should then proceed to create the missing image, and check that the volume was created successfully.

We should also check that we can delete the image the volume was created from (assuming it works like server and flavors), to ensure we don't add an unnecessary finalizer.

finalizer, externalObjectFieldOwner,
)

var imageDependency = dependency.NewDeletionGuardDependency[*orcv1alpha1.VolumeList, *orcv1alpha1.Image](
Copy link
Collaborator

Choose a reason for hiding this comment

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

Most likely we don't want it to be a deletion guard because I expect that OpenStack allows us to delete an image after a volume was created from it (to be verified). See how we did for the server's dependency on flavor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will remove it but there is a small danger in that if someone manually deletes the volume after the image is deleted the create image will be called again but would be stuck in a loop of waiting for openstack as the image won't exist (I suspect this is similar to server and flavor)

Enables creating bootable volumes from images by adding an imageRef
field to the Volume spec. When specified, the volume is created with
the image baked in, making it suitable for boot-from-volume scenarios.

Changes:
- Add imageRef field to VolumeResourceSpec
- Add bootable and imageID fields to VolumeResourceStatus
- Add image dependency with deletion guard
- Add kuttl tests for bootable volume creation

assisted-by: claude
@eshulman2
Copy link
Contributor Author

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:minor Backwards-compatible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants