Skip to content

Set ManilaShareV1 annotation via OpenStackVersion#1876

Open
fmount wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
fmount:sharev1
Open

Set ManilaShareV1 annotation via OpenStackVersion#1876
fmount wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
fmount:sharev1

Conversation

@fmount
Copy link
Copy Markdown
Contributor

@fmount fmount commented Apr 8, 2026

This patch adds support for ManilaShareV1 configuration in openstack-operator. It ensures that the annotation manila.openstack.org/sharev1 is set to true by default, so we can easily invert the logic for RHOSO 19, where share service and v1 endpoints are removed [1].

Jira: OSPRH-27947

[1] https://review.opendev.org/q/topic:%22remove-v1%22+and+project:openstack/manila

@openshift-ci openshift-ci bot requested review from dprince and slagle April 8, 2026 09:13
@fmount fmount requested a review from dprince April 8, 2026 09:13
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 8, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

OpenStackControlPlane CRD Size Report

Metric Value
CRD JSON size 322325 bytes (315KB)
Base branch size 322325 bytes
Change +0.00%
Status yellow — growing
Threshold reference
Color Range Meaning
🟢 green < 300KB Comfortable
🟡 yellow 300–400KB Growing
🟠 orange 400–750KB Concerning
🔴 red > 750KB Approaching 1.5MB etcd limit (cut in half to allow space for update)

@fmount fmount requested review from abays and stuggi April 8, 2026 09:38
manila.SetAnnotations(make(map[string]string))
}
if version.Status.ServiceDefaults.ManilaSharev1 != nil && *version.Status.ServiceDefaults.ManilaSharev1 == "true" {
manila.GetAnnotations()[manilav1.ManilaShareV1Label] = "true"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just want to make sure: the map here functions as by-reference and not by-value, right? I just feel like I recall some places where we've had to get the map, set a value, then inject the map back into the parent object.

Copy link
Copy Markdown
Contributor Author

@fmount fmount Apr 8, 2026

Choose a reason for hiding this comment

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

Yeah, I see your concern, but when we do manila.GetAnnotations()[manilav1.ManilaShareV1Label] = "true" we're writing directly into the annotations map.
With SetAnnotations on L220 we can make sure the map is initialized (so we do not panic), but then we get the reference to it [1], so we don't need to extract, write the value, inject it back to the parent object. I recall we had this problem for other objects (e.g. the glanceAPI map for example), but this doesn't apply to the annotations that are realized through a native map (which is a pointer by definition) :D

[1] https://github.com/kubernetes/apimachinery/blob/master/pkg/apis/meta/v1/types.go

This patch adds support for ManilaShareV1 configuration in OpenStack
operator. It ensures that the annotation "manila.openstack.org/sharev1"
is set to "true" by default, so we can easily invert the logic for RHOSO
19, where share service and v1 endpoints are removed.

Signed-off-by: Francesco Pantano <fpantano@redhat.com>
@fmount
Copy link
Copy Markdown
Contributor Author

fmount commented Apr 8, 2026

/test openstack-operator-build-deploy-kuttl-4-18

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 8, 2026

@fmount: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/openstack-operator-build-deploy-kuttl-4-18 bf20ef1 link true /test openstack-operator-build-deploy-kuttl-4-18

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@fmount
Copy link
Copy Markdown
Contributor Author

fmount commented Apr 9, 2026

/test openstack-operator-build-deploy-kuttl-4-18

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants