Skip to content

Add kuttl tests for lightspeed-app-server /metrics endpoint#22

Open
jancervenka wants to merge 1 commit into
openstack-k8s-operators:mainfrom
jancervenka:kuttl-tests-for-metrics-endpoint
Open

Add kuttl tests for lightspeed-app-server /metrics endpoint#22
jancervenka wants to merge 1 commit into
openstack-k8s-operators:mainfrom
jancervenka:kuttl-tests-for-metrics-endpoint

Conversation

@jancervenka

Copy link
Copy Markdown

The kuttl test asserts that the endpoint is reachable and responds with a valid Prometheus format.

@openshift-ci openshift-ci Bot requested review from Akrog and lpiwowar July 15, 2026 15:07
@openshift-ci

openshift-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@openshift-ci

openshift-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown

Hi @jancervenka. Thanks for your PR.

I'm waiting for a openstack-k8s-operators 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.

Regular contributors should join the org to skip this step.

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.

@jancervenka jancervenka force-pushed the kuttl-tests-for-metrics-endpoint branch from b371d7d to 4fef44e Compare July 15, 2026 15:11
The kuttl test asserts that the endpoint is reachable and responds with a valid Prometheus format.
@jancervenka jancervenka force-pushed the kuttl-tests-for-metrics-endpoint branch from 4fef44e to 3c85e10 Compare July 15, 2026 15:12
@umago

umago commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

/ok-to-test

@umago umago self-requested a review July 15, 2026 15:20
- kind: ServiceAccount
name: ${SA_NAME}
namespace: ${NAMESPACE}
EOF

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These ClusterRole and ClusterRoleBinding are beeing created but I don't see them being cleaned up at the end, so they will stay in the cluster as leftovers artifacts.

Also, I think we can create them in a declarative way ? Instead of inside the TestAssert

echo "Response (first 500 chars):"
echo "$METRICS_OUTPUT" | head -c 500
exit 1
fi

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would to hear @lpiwowar and/or @malingatembo opinion on using kuttl tests this ^

It seems like it fits more into the new test framework than kuttl. Because this is asserting some behavior from our API endpoint rather than just asserting the state of the cluster (which I believe kuttl is better designed for).

echo "$METRICS_OUTPUT" | head -c 500
exit 1
fi

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also, if we are OK with the kuttl tests running these type of tests, I think we should also check for at least one lightspeed_ specific metric here ? Making sure it's the right endpoint and not just any other prometheus endpoint

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.

2 participants