Skip to content

Allow increasing PVC size to the minimum supported by its storage class - #3711

Merged
kubevirt-bot merged 1 commit into
kubevirt:mainfrom
arnongilboa:set_min_pvc_size_per_sc_ann
May 2, 2025
Merged

kubevirt-bot merged 1 commit into
kubevirt:mainfrom
arnongilboa:set_min_pvc_size_per_sc_ann

Conversation

@arnongilboa

@arnongilboa arnongilboa commented Apr 23, 2025 •

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:
Supports both DataVolume PVC rendering and PVC mutating webhook rendering, so it can cover the kubevirt-side created TPM small PVC and any other PVC created by DataVolume or independently. For independent PVCs they should be labeled with cdi.kubevirt.io/applyStorageProfile: "true" and CDI featureGate WebhookPvcRendering should be enabled. A StorageProfile can be annotated with its minimum supported volume size with e.g.:
cdi.kubevirt.io/minimumSupportedPvcSize: 4Gi

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

Allow increasing PVC size to the minimum supported by its storage class

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/S labels Apr 23, 2025
@arnongilboa
arnongilboa force-pushed the set_min_pvc_size_per_sc_ann branch from 18f4f61 to 17f0bef Compare April 23, 2025 14:25
@coveralls

coveralls commented Apr 23, 2025 •

Copy link
Copy Markdown

Coverage Status

coverage: 59.218% (+0.04%) from 59.18%
when pulling 8136697 on arnongilboa:set_min_pvc_size_per_sc_ann
into 247cf32 on kubevirt:main.

@arnongilboa
arnongilboa force-pushed the set_min_pvc_size_per_sc_ann branch from 17f0bef to c13fcfc Compare April 24, 2025 09:08
@arnongilboa arnongilboa changed the title Allow increating PVC size to the minimum supported by its storage class Allow increasing PVC size to the minimum supported by its storage class Apr 24, 2025
@arnongilboa
arnongilboa force-pushed the set_min_pvc_size_per_sc_ann branch from c13fcfc to 1934b6c Compare April 24, 2025 09:09
@alromeros

Copy link
Copy Markdown
Member

/cc @alromeros

@kubevirt-bot
kubevirt-bot requested a review from alromeros April 29, 2025 09:19
@arnongilboa
arnongilboa force-pushed the set_min_pvc_size_per_sc_ann branch from 1934b6c to dd94a7b Compare April 29, 2025 14:15
Comment thread pkg/controller/datavolume/util.go Outdated
if err := client.Get(context.TODO(), types.NamespacedName{Name: *scName}, storageClass); err == nil {
if val, exists := storageClass.Annotations[AnnMinimumSupportedPVCSize]; exists {
minSize, err := resource.ParseQuantity(val)
if err == nil && requestedSize.Cmp(minSize) == -1 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it would be helpful to log or return an error if parsing the annotation fails, similar to what was done in the kubevirt PR. This way users can be notified if the annotation is set incorrectly.

@awels awels left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good, just the one comment by Alvaro.

@arnongilboa
arnongilboa force-pushed the set_min_pvc_size_per_sc_ann branch from dd94a7b to e60536c Compare April 30, 2025 09:55
Supports both DataVolume PVC rendering and PVC mutating webhook
rendering, so it can cover the kubevirt-side created TPM small PVC and
any other PVC created by DV or independently. For independent PVCs they
should be labeled with cdi.kubevirt.io/applyStorageProfile: "true" and
CDI featureGate WebhookPvcRendering should be enabled. A StorageProfile
can be annotated with its minimum supported volume size with e.g.:
    cdi.kubevirt.io/minimumSupportedPvcSize: 4Gi

Signed-off-by: Arnon Gilboa <[email protected]>
@arnongilboa
arnongilboa force-pushed the set_min_pvc_size_per_sc_ann branch from e60536c to 8136697 Compare April 30, 2025 10:09
@alromeros

Copy link
Copy Markdown
Member

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label May 2, 2025

@awels awels left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/approve

@kubevirt-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: awels

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

The pull request process is described here

Details 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 2, 2025
@kubevirt-bot
kubevirt-bot merged commit a43095f into kubevirt:main May 2, 2025
@arnongilboa

Copy link
Copy Markdown
Collaborator Author

/cherrypick release-v1.62

arnongilboa added a commit to arnongilboa/containerized-data-importer that referenced this pull request May 8, 2025
The feature is available since v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner
(kubevirt#3711), and mainly in order to support:
kubevirt/kubevirt#14637

Signed-off-by: Arnon Gilboa <[email protected]>
arnongilboa added a commit to arnongilboa/hyperconverged-cluster-operator that referenced this pull request May 8, 2025
The feature is available since CDI v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner:
kubevirt/containerized-data-importer#3711
and mainly in order to support:
kubevirt/kubevirt#14637

Signed-off-by: Arnon Gilboa <[email protected]>
arnongilboa added a commit to arnongilboa/hyperconverged-cluster-operator that referenced this pull request May 8, 2025
The feature is available since CDI v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner:
kubevirt/containerized-data-importer#3711
and mainly in order to support:
kubevirt/kubevirt#14637

Signed-off-by: Arnon Gilboa <[email protected]>
arnongilboa added a commit to arnongilboa/hyperconverged-cluster-operator that referenced this pull request May 8, 2025
The feature is available since CDI v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner:
kubevirt/containerized-data-importer#3711
and mainly in order to support:
kubevirt/kubevirt#14637

Signed-off-by: Arnon Gilboa <[email protected]>
kubevirt-bot pushed a commit to kubevirt/hyperconverged-cluster-operator that referenced this pull request May 9, 2025
The feature is available since CDI v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner:
kubevirt/containerized-data-importer#3711
and mainly in order to support:
kubevirt/kubevirt#14637

Signed-off-by: Arnon Gilboa <[email protected]>
kubevirt-bot pushed a commit to kubevirt-bot/hyperconverged-cluster-operator that referenced this pull request May 9, 2025
The feature is available since CDI v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner:
kubevirt/containerized-data-importer#3711
and mainly in order to support:
kubevirt/kubevirt#14637

Signed-off-by: Arnon Gilboa <[email protected]>
kubevirt-bot pushed a commit to kubevirt-bot/hyperconverged-cluster-operator that referenced this pull request May 9, 2025
The feature is available since CDI v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner:
kubevirt/containerized-data-importer#3711
and mainly in order to support:
kubevirt/kubevirt#14637

Signed-off-by: Arnon Gilboa <[email protected]>
kubevirt-bot added a commit to kubevirt/hyperconverged-cluster-operator that referenced this pull request May 11, 2025
The feature is available since CDI v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner:
kubevirt/containerized-data-importer#3711
and mainly in order to support:
kubevirt/kubevirt#14637

Signed-off-by: Arnon Gilboa <[email protected]>
Co-authored-by: Arnon Gilboa <[email protected]>
arnongilboa added a commit to arnongilboa/containerized-data-importer that referenced this pull request May 11, 2025
The feature is available since v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner
(kubevirt#3711), and mainly in order to support:
kubevirt/kubevirt#14637

Signed-off-by: Arnon Gilboa <[email protected]>
arnongilboa added a commit to arnongilboa/containerized-data-importer that referenced this pull request May 11, 2025
The feature is available since v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner
(kubevirt#3711), and mainly in order to support:
kubevirt/kubevirt#14637

As a bonus, the related Serial tests are now parallel. Thanks akalenyu:)

Signed-off-by: Arnon Gilboa <[email protected]>
arnongilboa added a commit to arnongilboa/containerized-data-importer that referenced this pull request May 14, 2025
Follow-up of kubevirt#3711, annotating specifically:

-pd.csi.storage.gke.io hyperdisk (4Gi)
-ebs.csi.aws.com io1/io2 (4Gi) & gp2/gp3 (1Gi)

Signed-off-by: Arnon Gilboa <[email protected]>
arnongilboa added a commit to arnongilboa/containerized-data-importer that referenced this pull request May 14, 2025
Follow-up of kubevirt#3711, annotating specifically:

-pd.csi.storage.gke.io hyperdisk (4Gi)
-ebs.csi.aws.com io1/io2 (4Gi) & gp2/gp3 (1Gi)

Signed-off-by: Arnon Gilboa <[email protected]>
kubevirt-bot pushed a commit that referenced this pull request May 14, 2025
The feature is available since v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner
(#3711), and mainly in order to support:
kubevirt/kubevirt#14637

As a bonus, the related Serial tests are now parallel. Thanks akalenyu:)

Signed-off-by: Arnon Gilboa <[email protected]>
kubevirt-bot pushed a commit to kubevirt-bot/containerized-data-importer that referenced this pull request May 15, 2025
The feature is available since v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner
(kubevirt#3711), and mainly in order to support:
kubevirt/kubevirt#14637

As a bonus, the related Serial tests are now parallel. Thanks akalenyu:)

Signed-off-by: Arnon Gilboa <[email protected]>
kubevirt-bot pushed a commit to kubevirt-bot/containerized-data-importer that referenced this pull request May 15, 2025
The feature is available since v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner
(kubevirt#3711), and mainly in order to support:
kubevirt/kubevirt#14637

As a bonus, the related Serial tests are now parallel. Thanks akalenyu:)

Signed-off-by: Arnon Gilboa <[email protected]>
kubevirt-bot added a commit that referenced this pull request May 19, 2025
The feature is available since v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner
(#3711), and mainly in order to support:
kubevirt/kubevirt#14637

As a bonus, the related Serial tests are now parallel. Thanks akalenyu:)

Signed-off-by: Arnon Gilboa <[email protected]>
Co-authored-by: Arnon Gilboa <[email protected]>
kubevirt-bot added a commit that referenced this pull request May 19, 2025
The feature is available since v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner
(#3711), and mainly in order to support:
kubevirt/kubevirt#14637

As a bonus, the related Serial tests are now parallel. Thanks akalenyu:)

Signed-off-by: Arnon Gilboa <[email protected]>
Co-authored-by: Arnon Gilboa <[email protected]>
kubevirt-bot pushed a commit that referenced this pull request May 20, 2025
…3746)

Follow-up of #3711, annotating specifically:

-pd.csi.storage.gke.io hyperdisk (4Gi)
-ebs.csi.aws.com io1/io2 (4Gi) & gp2/gp3 (1Gi)

Signed-off-by: Arnon Gilboa <[email protected]>
kubevirt-bot pushed a commit to kubevirt-bot/containerized-data-importer that referenced this pull request May 20, 2025
Follow-up of kubevirt#3711, annotating specifically:

-pd.csi.storage.gke.io hyperdisk (4Gi)
-ebs.csi.aws.com io1/io2 (4Gi) & gp2/gp3 (1Gi)

Signed-off-by: Arnon Gilboa <[email protected]>
kubevirt-bot pushed a commit to kubevirt-bot/containerized-data-importer that referenced this pull request May 20, 2025
Follow-up of kubevirt#3711, annotating specifically:

-pd.csi.storage.gke.io hyperdisk (4Gi)
-ebs.csi.aws.com io1/io2 (4Gi) & gp2/gp3 (1Gi)

Signed-off-by: Arnon Gilboa <[email protected]>
kubevirt-bot added a commit to kubevirt/hyperconverged-cluster-operator that referenced this pull request May 20, 2025
The feature is available since CDI v1.59, and we enable it by default to
allow increasing PVC size to the minimum supported by its provisioner:
kubevirt/containerized-data-importer#3711
and mainly in order to support:
kubevirt/kubevirt#14637

Signed-off-by: Arnon Gilboa <[email protected]>
Co-authored-by: Arnon Gilboa <[email protected]>
kubevirt-bot added a commit that referenced this pull request May 20, 2025
…3758)

Follow-up of #3711, annotating specifically:

-pd.csi.storage.gke.io hyperdisk (4Gi)
-ebs.csi.aws.com io1/io2 (4Gi) & gp2/gp3 (1Gi)

Signed-off-by: Arnon Gilboa <[email protected]>
Co-authored-by: Arnon Gilboa <[email protected]>
kubevirt-bot added a commit that referenced this pull request May 20, 2025
…3759)

Follow-up of #3711, annotating specifically:

-pd.csi.storage.gke.io hyperdisk (4Gi)
-ebs.csi.aws.com io1/io2 (4Gi) & gp2/gp3 (1Gi)

Signed-off-by: Arnon Gilboa <[email protected]>
Co-authored-by: Arnon Gilboa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. 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 Denotes a PR that will be considered when it comes time to generate release notes. size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants