Skip to content

Add resources required to run lightspeed-tests - #4140

Draft
jancervenka wants to merge 8 commits into
mainfrom
update-lightspeed-playbook-OSPRH-33342-additional-resources
Draft

Add resources required to run lightspeed-tests#4140
jancervenka wants to merge 8 commits into
mainfrom
update-lightspeed-playbook-OSPRH-33342-additional-resources

Conversation

@jancervenka

@jancervenka jancervenka commented Aug 25, 2026

Copy link
Copy Markdown

test-operator expects a ConfigMap and two secrets to exists before it will start executing a test suite. We create the expected dummy resources with no data to satisfy the requirement.

test-operator is using the default ServiceAccount to run the tests. We need to create a ClusterRole and ClusterRoleBinding to grant the default SA access to the Lightspeed service.

Updated the playbook to work with the current OpenStack Lightspeed operator
after org migration from openstack-lightspeed to openstack-k8s-operators.

Changes:
1. Namespace: Changed default from openshift-lightspeed to openstack-lightspeed
   to match operator's suggested namespace in csv
2. CR creation: Added STEP 3 to create OpenStackLightspeed CR
   - Deploys the actual service (not just operator)
   - Configurable LLM parameters (endpoint, credentials, model)
   - Graceful timeout with ignore_errors for test environments
3. Kubeconfig fix: Resolved variable recursion bug on line 29
   - Renamed cifmw_openshift_kubeconfig to kubeconfig_path
   - Prevents 'recursive loop detected' error

Relates-To: OSPRH-33342"
Signed-off-by: malingatembo <tembomalinga@gmail.com>
Signed-off-by: malingatembo <tembomalinga@gmail.com>
Fixes the following 3 blocking issues

1. Remove hardcoded Downstream LLM configurations
  - Make llmEndpoint and modelName required variables
  - Update README to document these vars as REQUIRED

2. Add llm credentials secret creation
  - Create secret from cifmw_openstack_lightspeed_api_token when provided
  - Validate secret exists when variable not provided
  - Fail fast when secret missing ( with clear message )

3. Add TLS certificate ConfigMap creation
  - Create ConfigMap from cifmw_openstack_lightspeed_ca_cert when provided
  - Validate ConfigMap exists when variable not provided
  - Fail early with clear error message if ConfigMap missing
  - Provides flexibility: either create via playbook or pre-create manually

Signed-off-by: Malinga Tembo <mtembo@redhat.com>
this pr:
1. removes CR wait task (fixes ignore_errors issue)
  - ci job calling this hook should now be responsible
  for waiting for full service health

2. Add no_log to secret creation

3. Add CA and URL download support

Signed-off-by: Malinga Tembo <mtembo@redhat.com>
The example incorrectly showed HTTP. Updated to HTTPS and documented
the requirement. In fact RH cert server uses HTTPS.

Fixes coderabbit security concern.

Signed-off-by: Malinga Tembo <mtembo@redhat.com>"
Per lpiwowar feedback:
- Add no_log to secret verification task (prevent token leak with -vvvv)
- Merge two ConfigMap creation tasks into one with conditional logic

Signed-off-by: Malinga Tembo <mtembo@redhat.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@openshift-ci

openshift-ci Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

test-operator expects a ConfigMap and two secrets to exists before
it will start executing a test suite. We create the expected dummy
resources with not data to satisfy the requirement.

test-operator is using the default ServiceAccount to run this test.
We need to create a ClusterRole and ClusterRoleBinding to grant
the default SA access to the Lightspeed service.

Signed-off-by: Jan Cervenka <jcervenk@redhat.com>
@jancervenka
jancervenka force-pushed the update-lightspeed-playbook-OSPRH-33342-additional-resources branch from 77088b0 to 9c76c36 Compare August 25, 2026 11:43
@jancervenka

jancervenka commented Aug 25, 2026

Copy link
Copy Markdown
Author

Hi @malingatembo! we were discussing with @lpiwowar (see: openstack-k8s-operators/lightspeed-tests#12) create some additional resources in your playbook. The resources are required by the test-operator to successfully run the lightspeed-test suite.

See the commit message:

test-operator expects a ConfigMap and two secrets to exists before it will start executing a test suite. We create the expected dummy resources with no data to satisfy the requirement.

test-operator is using the default ServiceAccount to run the tests. We need to create a ClusterRole and ClusterRoleBinding to grant the default SA access to the Lightspeed service.

@lpiwowar

Copy link
Copy Markdown
Contributor

@jancervenka thanks for the PR! 🎉 The initial idea was for this PR to build on top of @malingatembo's PR. We can then use Depends-On: and test your changes alongside the changes from @malingatembo's PR -> #4108 (once the job Malinga Tembo is working on is ready -> openstack-k8s-operators/lightspeed-operator#65)

If it turns out that the changes you introduced work, then we can merge both PRs into one (into @malingatembo's PR #4108 with a proper commit attributing your work, of course :).

I suggest:

  • Marking this as a draft and building this PR on top of the one from @malingatembo. I wonder whether it is possible to use the stacked PRs GitHub recently introduced for this (I have not experimented with them yet). But what you can definitely do is check out the branch from @malingatembo's PR and check out a new branch out of it with your changes.

Just want to say that we are getting a little bit ahead ourselves here. But if everything clicks then the PR merging is going to be easy. Also, I'm personally ok just waiting it out until the job @malingatembo is working on gets ready. One way or the other I would mark this as a draft for now 🙈 .

@jancervenka
jancervenka deleted the branch main August 26, 2026 09:40
@jancervenka jancervenka reopened this Aug 26, 2026
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@jancervenka
jancervenka marked this pull request as draft August 26, 2026 10:34
@jancervenka
jancervenka changed the base branch from update-lightspeed-playbook-OSPRH-33342 to main August 26, 2026 12:09
@jancervenka

Copy link
Copy Markdown
Author

the PR is checked out of @malingatembo's work and marked as a draft.

@jancervenka
jancervenka changed the base branch from main to malinga/update-lightspeed-playbook-OSPRH-33342 August 26, 2026 12:22
@jancervenka
jancervenka changed the base branch from malinga/update-lightspeed-playbook-OSPRH-33342 to update-lightspeed-playbook-OSPRH-33342 August 26, 2026 12:39
@jancervenka
jancervenka changed the base branch from update-lightspeed-playbook-OSPRH-33342 to malinga/update-lightspeed-playbook-OSPRH-33342 August 26, 2026 13:09
@jancervenka
jancervenka changed the base branch from malinga/update-lightspeed-playbook-OSPRH-33342 to main August 26, 2026 13:10
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