Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.

Scope resource names to CR instance for multi-CR support#115

Open
dprince wants to merge 1 commit into
openstack-lightspeed:lcore-migrationfrom
dprince:lcore-migration-multi-cr
Open

Scope resource names to CR instance for multi-CR support#115
dprince wants to merge 1 commit into
openstack-lightspeed:lcore-migrationfrom
dprince:lcore-migration-multi-cr

Conversation

@dprince

@dprince dprince commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Multiple OpenStackLightspeed CRs in the same namespace failed because all Kubernetes resources used hardcoded names, causing ownership conflicts on the second CR. Convert resource name constants to functions that prefix with the instance name and add app.kubernetes.io/instance to label selectors so each CR manages its own isolated set of resources.

Multiple OpenStackLightspeed CRs in the same namespace failed because
all Kubernetes resources used hardcoded names, causing ownership
conflicts on the second CR. Convert resource name constants to
functions that prefix with the instance name and add
app.kubernetes.io/instance to label selectors so each CR manages its
own isolated set of resources.
@openshift-ci openshift-ci Bot requested review from lpiwowar and umago June 15, 2026 12:46
@openshift-ci

openshift-ci Bot commented Jun 15, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dprince
Once this PR has been reviewed and has the lgtm label, please assign umago 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

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 668fa7ca-1390-421e-90b0-f251a7c7e269

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci

openshift-ci Bot commented Jun 15, 2026

Copy link
Copy Markdown

Hi @dprince. Thanks for your PR.

I'm waiting for a openstack-lightspeed member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@lpiwowar

Copy link
Copy Markdown
Contributor

/ok-to-test

@openshift-ci

openshift-ci Bot commented Jun 15, 2026

Copy link
Copy Markdown

@dprince: 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-lightspeed-kuttl-4-18 70a0abf link true /test openstack-lightspeed-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.

@lpiwowar lpiwowar left a comment

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.

Thanks for the PR!:) Just two comments.

func ConsoleUIDeploymentName(instanceName string) string {
return instanceName + "-console-plugin"
}
func ConsoleUIPluginName(instanceName string) string {

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.

issue (blocking): The console plugin does not get deployed currently with this version of the code (even with a single OpenStackLightspeed instance). I think that the console is using the plugin name to fetch files from the console plugin pod and since the ConsoleUIPluginName is dynamic now the console is trying to retrieve a file from the Lightspeed Console Plugin image that does not exist. Hardcoding the return value to lightspeed-console-plugin worked.

Image

cm := &corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Name: CABundleConfigMapName,
Name: CABundleConfigMapName(instance.Name),

@lpiwowar lpiwowar Jun 17, 2026

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.

question: Do we really want the operator to accept multiple OpenStackLightspeed instances at this point? Just a thread for a discussion. I remember we initially wanted to support only one OpenStackLightspeed instance.

The opposite direction would be to allow only one instance of OpenStackLightspeed at this point (e.g., accept one single instance with a specific name openstack-lightspeed).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants