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

Simplify glance-operator pvc interface #554

Merged

Conversation

fmount
Copy link
Contributor

@fmount fmount commented Jun 11, 2024

This patch simplifies the way we build the storage interface for glance.
In general Glance requires a staging area to manipulate data during an import operation.
It is possible to copy image data into multiple stores using image import workflow, and all the
import methods and plugins are based on this flow, hence some persistence is required for
the resulting Glance Pod.
With this PR, a Storage struct is exposed by the glance-operator API, and it helps to choose
the best layout for a particular glanceAPI.
When defining the storage requirements for a GlanceAPI, with this patch is possible to choose
between two different models:

  • External
  • PVC

External means that no PVCs are provisioned by the operator, and the human administrator should
take care about providing persistence via ExtraMounts. PVC is still the default interface, and they
are provisioned by the operator.

Jira: https://issues.redhat.com/browse/OSPRH-6719
Depends-On: openstack-k8s-operators/openstack-operator#843

@openshift-ci openshift-ci bot requested review from abays and fultonj June 11, 2024 13:17
@fmount fmount removed the request for review from abays June 11, 2024 13:17
@fmount fmount requested review from konan-abhi, abays and dprince June 11, 2024 13:17
docs/dev/design-decisions.md Outdated Show resolved Hide resolved
docs/dev/design-decisions.md Outdated Show resolved Hide resolved
@fmount fmount force-pushed the simple_pvc_interface branch from 345d5ce to c6ef503 Compare June 11, 2024 14:03
@fmount fmount changed the title Simplify glance-operator pvc interface WIP - Simplify glance-operator pvc interface Jun 11, 2024
@fmount fmount force-pushed the simple_pvc_interface branch from c48a24d to 1eb769a Compare June 12, 2024 11:21
@fmount fmount changed the title WIP - Simplify glance-operator pvc interface Simplify glance-operator pvc interface Jun 12, 2024
@fmount
Copy link
Contributor Author

fmount commented Jun 12, 2024

/test glance-operator-build-deploy-kuttl

1 similar comment
@fmount
Copy link
Contributor Author

fmount commented Jun 12, 2024

/test glance-operator-build-deploy-kuttl

@fmount
Copy link
Contributor Author

fmount commented Jun 12, 2024

/retest-required

@fmount fmount force-pushed the simple_pvc_interface branch 2 times, most recently from d9fcaf0 to 8f314f2 Compare June 14, 2024 06:05
@fmount fmount requested a review from konan-abhi June 14, 2024 20:15
fmount added 7 commits June 17, 2024 09:29
Do not automatically create an image-conversion PVC when Ceph is set as
a backend. It will be documented that the requestSize should be bigger
for the default PVC or other strategies should be used (e.g. NFS
share attached to the Pods via extraMounts). This patch removes the
automation that automatically created an image-conversion PVC.

Signed-off-by: Francesco Pantano <[email protected]>
We currently provide both StorageClass and StorageRequest that can be
propagated to the underlying instances.
However, it might be possible that operators use extraMounts to plug a
NFS share mapped to /var/lib/glance.
In this case, the API should be updated to not provision any PVC and
let the human operator to take care about it using the extraMounts
interface.
This patch adds a "Storage" struct that is supposed to act as the high
level interface where the storage strategy for glance is specified.
If the ephemeral boolean is set, no PVCs are provisioned.

Signed-off-by: Francesco Pantano <[email protected]>
The Ephemeral bool field has been added to the API and propagated to the
GetVolumeMounts function: this allows to skip both the PVC creation
and mount, making glance stateless from a storage point of view.
Persistent should be provided by human operator via extraMounts.

Signed-off-by: Francesco Pantano <[email protected]>
We currently provide both StorageClass and StorageRequest that can be
propagated to the underlying instances.
However, it might be possible that operators use extraMounts to plug a
NFS share mapped to /var/lib/glance.
In this case, the API should be updated to not provision any PVC and
let the human operator to take care about it using the extraMounts
interface.
This patch adds a "Storage" struct that is supposed to act as the high
level interface where the storage strategy for glance is specified.
If the ephemeral boolean is set, no PVCs are provisioned.

Signed-off-by: Francesco Pantano <[email protected]>
Design decision doc lacks of a Storage Requirements section where the PVCs
usage is described. This patch helps fixing this part and clarify how
they are used in Glance.

Signed-off-by: Francesco Pantano <[email protected]>
Signed-off-by: Francesco Pantano <[email protected]>
@fmount fmount force-pushed the simple_pvc_interface branch from d34128b to 2c095ba Compare June 17, 2024 08:54
Copy link
Contributor

@abays abays left a comment

Choose a reason for hiding this comment

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

+1 from me. Will give others a chance to review before approving

@fmount
Copy link
Contributor Author

fmount commented Jun 17, 2024

+1 from me. Will give others a chance to review before approving

ack thank you, I think I asked @konan-abhi to review and he was ok w/ this change, but we can wait for him to re-approve. Thank you @abays !

Copy link
Contributor

@konan-abhi konan-abhi 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, thank you!

Copy link
Contributor

openshift-ci bot commented Jun 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fmount, konan-abhi

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

@openshift-merge-bot openshift-merge-bot bot merged commit 90d7bb7 into openstack-k8s-operators:main Jun 17, 2024
7 checks passed
fmount added a commit to fmount/architecture that referenced this pull request Jun 20, 2024
We recently merged [1][2] and the Glance API have been updated to
reflect the new storage interface.
This patch aligns architectures repo CRs with the new structure.

[1] openstack-k8s-operators/glance-operator#554
[2] openstack-k8s-operators/openstack-operator#843

Jira: https://issues.redhat.com/browse/OSPRH-6719

Signed-off-by: Francesco Pantano <[email protected]>
softwarefactory-project-zuul bot added a commit to openstack-k8s-operators/architecture that referenced this pull request Jun 20, 2024
Update glance storageClass propagation

We recently merged [1][2] and the Glance API have been updated to reflect the new storage interface.
This patch aligns architectures repo CRs with the new structure.
[1] openstack-k8s-operators/glance-operator#554
[2] openstack-k8s-operators/openstack-operator#843
Jira: https://issues.redhat.com/browse/OSPRH-6719

Reviewed-by: Andrew Bays <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants