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

Update DataVolume doc references from the 'pvc' API to the 'storage' API #3244

Merged
merged 12 commits into from
Jun 7, 2024
Merged

Update DataVolume doc references from the 'pvc' API to the 'storage' API #3244

merged 12 commits into from
Jun 7, 2024

Conversation

EduardGomezEscandell
Copy link
Contributor

What this PR does / why we need it:

Updates DataVolume examples and documentation so they use the storage API instead of the pvc API, except for a couple of places where the use of pvc is relevant (to contrast it to the storage API).

Furthermore:

  • Removed the ReadWriteOnce argument as it is set by default when using the storage API.
  • Removed the storage resources requests when cloning from a PVC.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
https://issues.redhat.com/browse/CNV-38189

Special notes for your reviewer:

Release note:

NONE

@kubevirt-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels May 6, 2024
@kubevirt-bot kubevirt-bot requested review from aglitke and awels May 6, 2024 10:36
@EduardGomezEscandell
Copy link
Contributor Author

/cc @alromeros

@EduardGomezEscandell
Copy link
Contributor Author

/test all

@EduardGomezEscandell
Copy link
Contributor Author

/retest

@EduardGomezEscandell EduardGomezEscandell marked this pull request as ready for review May 7, 2024 13:53
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 7, 2024
@EduardGomezEscandell
Copy link
Contributor Author

/retest

1 similar comment
@EduardGomezEscandell
Copy link
Contributor Author

/retest

@alromeros
Copy link
Collaborator

Thanks for the PR! I think this looks good but I'd update the datavolumes.md doc a bit so we prioritize the ## Target Storage/PVC section more. We could move it above the source section and emphasize the possibility of dropping the accessMode if we use the storage api. That justifies the changes a bit more IMO.

@EduardGomezEscandell
Copy link
Contributor Author

EduardGomezEscandell commented May 10, 2024

@alromeros Sounds good. I also rephrased it a bit to highlight its conveniences.

Tip

I also used this sort of banner, I think it works well to grab the attention of readers

Warning

Also this one, pretty nice too

@kubevirt-bot kubevirt-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 11, 2024
@coveralls
Copy link

coveralls commented May 13, 2024

Coverage Status

coverage: 59.063% (+41.8%) from 17.245%
when pulling 13c0ff5 on EduardGomezEscandell:doc-use-storage-api
into 7a49da9 on kubevirt:main.

@alromeros
Copy link
Collaborator

Looks good, thanks! Let's see what others think
/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label May 13, 2024
resources:
requests:
storage: 500Mi
storage:
Copy link
Member

Choose a reason for hiding this comment

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

does this need a {} in order to be valid yaml?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oops this is true, it should be

storage: {}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch :)

```

### Storage
The `storage` type is similar to `pvc` but it allows you to ommit some parameters.
Copy link
Member

Choose a reason for hiding this comment

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

s/ommit/omit/

virtualization storage class by annotating it with
`storageclass.kubevirt.io/is-default-virt-class` set to `"true"`.

If you request storage with `volumeMode: fileSystem`, CDI will take the file system
Copy link
Member

Choose a reason for hiding this comment

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

We should word this slightly differently so say that fs overhead is applied whenever filesystem volumeMode is used in conjunction with the storage api (whether specified explicitly or chosen automatically). As you currently have it it sounds like this happens only if you include volumeMode: FileSystem in the spec.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense 👍

@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label May 13, 2024
@EduardGomezEscandell
Copy link
Contributor Author

/retest

All instances of DataVolume > Spec > PVC have been replaced with storage,
except for two cases in datavolumes.md:
- Data Volumes>Target Storage/PVC>PVC
    https://github.com/kubevirt/containerized-data-importer/blob/338bafe/doc/datavolumes.md#pvc
- Data Volumes>Source>PVC source
    https://github.com/kubevirt/containerized-data-importer/blob/338bafe/doc/datavolumes.md#pvc-source

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
I also reworded it so that the paragraph does not start in lower-case.

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Removed from storage options, I still kept it for the pvc.

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
This argument is optional. Only removed for 'storage', not 'pvc'.

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
@alromeros
Copy link
Collaborator

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label May 27, 2024
Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label May 31, 2024
@EduardGomezEscandell
Copy link
Contributor Author

/retest-required

@alromeros
Copy link
Collaborator

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 3, 2024
Copy link
Member

@awels awels left a comment

Choose a reason for hiding this comment

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

looks good one minor wording change.

doc/datavolumes.md Outdated Show resolved Hide resolved
Co-authored-by: Alexander Wels <awels@redhat.com>
Signed-off-by: Edu Gómez Escandell <edu1997xyz@gmail.com>
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 6, 2024
@awels
Copy link
Member

awels commented Jun 6, 2024

/test pull-containerized-data-importer-e2e-ceph

Copy link
Member

@awels awels left a comment

Choose a reason for hiding this comment

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

/approve

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 6, 2024
@kubevirt-bot
Copy link
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

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 Jun 6, 2024
@EduardGomezEscandell
Copy link
Contributor Author

/retest

@kubevirt-bot kubevirt-bot merged commit f3d0060 into kubevirt:main Jun 7, 2024
18 of 19 checks passed
@EduardGomezEscandell EduardGomezEscandell deleted the doc-use-storage-api branch June 7, 2024 17:23
Copy link
Contributor

@kgoldbla kgoldbla left a comment

Choose a reason for hiding this comment

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

looks fine

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-none Denotes a PR that doesn't merit a release note. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants