Skip to content

Conversation

@noamasu
Copy link
Collaborator

@noamasu noamasu commented Dec 1, 2025

Moving cdi.kubevirt.io/applyStorageProfile to the API package.

What this PR does / why we need it:
This enables external projects (e.g., KubeVirt) to import the constant from the API package instead of duplicating it.

  • Add LabelApplyStorageProfile to containerized-data-importer-api package for external consumer access
  • Update CDI code to use cdiv1.LabelApplyStorageProfile

Which issue(s) this PR fixes:
Part of a fix for # https://issues.redhat.com/browse/CNV-73408

This kubevirt/kubevirt#16229 PR in kubevirt relies on this change.

Special notes for your reviewer:
@arnongilboa
@ShellyKa13

Release note:

NONE

@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Dec 1, 2025
@kubevirt-bot kubevirt-bot requested a review from aglitke December 1, 2025 10:28
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign aglitke for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot requested a review from akalenyu December 1, 2025 10:28
@kubevirt-bot kubevirt-bot added size/M release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Dec 1, 2025
@coveralls
Copy link

coveralls commented Dec 1, 2025

Coverage Status

coverage: 58.669% (+0.02%) from 58.652%
when pulling 36bfa8d on noamasu:bugfix/move-applystorageprofile-to-cdi-api
into a6f7fd8 on kubevirt:main.

Comment on lines 71 to 73
// Deprecated: Use cdiv1.LabelApplyStorageProfile from containerized-data-importer-api instead.
// This constant is kept for backwards compatibility and will be removed in a future release.
PvcApplyStorageProfileLabel = cdiv1.LabelApplyStorageProfile
Copy link
Collaborator

Choose a reason for hiding this comment

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

why keep it if all refs are updated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Still appears in the commit message and the PR description.

@noamasu noamasu force-pushed the bugfix/move-applystorageprofile-to-cdi-api branch 2 times, most recently from 4f3e82f to 379b3a2 Compare December 1, 2025 13:34

// LabelApplyStorageProfile is a PVC label that tells the CDI mutating webhook to modify the PVC
// according to the storage profile. When set to "true", the webhook will process the PVC based on
// its associated StorageProfile (e.g., setting volume mode, access modes, etc.).
Copy link
Collaborator

Choose a reason for hiding this comment

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

in the e.g. you may add "minimum supported pvc size", as it's the main motivation for its usage in kubevirt via the api.

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 2, 2025
@noamasu noamasu force-pushed the bugfix/move-applystorageprofile-to-cdi-api branch from 379b3a2 to 63cc5d7 Compare December 2, 2025 10:05
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 2, 2025
- Add LabelApplyStorageProfile to containerized-data-importer-api
  package for external consumer access
- Update CDI code to use cdiv1.LabelApplyStorageProfile

This enables external projects (e.g., KubeVirt) to import the constant
from the API package instead of duplicating it.

Signed-off-by: Noam Assouline <[email protected]>
@noamasu noamasu force-pushed the bugfix/move-applystorageprofile-to-cdi-api branch from 63cc5d7 to 36bfa8d Compare December 2, 2025 10:12
@arnongilboa
Copy link
Collaborator

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants