Skip to content

Conversation

@morenod
Copy link

@morenod morenod commented Oct 15, 2025

As part of the openstack [watcher](https://opendev.org/openstack/watcher) tests we need to delete old metrics to avoid errors calculating node resource utilizations.

We are doing that by patching prometheus on post_scripting, after controlplane is created, using:

oc patch prometheuses.monitoring.rhobs metric-storage --namespace=openstack --type=merge -p '{"spec":{"enableAdminAPI":true}}' here

Having the possibility of adding this parameter to the control-plane kustomize variables at the installation time would avoid to need the post scripting, making edpm jobs easier to maintain.

I have followed the same logic than used to add enableRemoteWriteReceiver parameter, which is also used by our tests to inject metrics.

I'm also creating a similar PR on observability-operator project, not sure which will require the other to be first merged

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 15, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@morenod morenod force-pushed the prometheus_enable_admin_api branch from 9061cb1 to 77b8964 Compare October 15, 2025 11:27
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 15, 2025

@morenod: 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/precommit-check 77b8964 link true /test precommit-check

Full PR test history. Your PR dashboard.

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.

@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/5e0a2470368744fa93603c27916716a5

openstack-k8s-operators-content-provider TIMED_OUT in 30m 55s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
✔️ telemetry-openstack-meta-content-provider-master SUCCESS in 2h 38m 31s
⚠️ telemetry-operator-multinode-default-telemetry SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
✔️ functional-tests-osp18 SUCCESS in 2h 03m 02s

@morenod
Copy link
Author

morenod commented Oct 15, 2025

Closing after seen that this changes cannot be added, they are automatically added when the field will be available on observability operator and make manifest will include it on the crd

@morenod morenod closed this Oct 15, 2025
@jlarriba
Copy link
Collaborator

I see what you want, but the files you are modified are not the place to expose new API fields. Those yamls are autogenerated by the operator-sdk. New API entries for exposing certain Prometheus behaviour must be exposed from metricstorage_types.go, and then put where they are required by the metricstorage_controller.go.

This means that the metricstorage_controller.go what it does is configure a MonitoringStack object. It uses the MonitoringStack API to get a Prometheus from cluster-observability-operator. However, MonitoringStack does not expose the enableAdminAPI from the subyacent "prometheuses.monitoring.rhobs".

To be able to expose that behaviour, we would need to have that field exposed by the cluster-observability-operator first, where the PrometheusConfig struct is defined, along with EnableOtlpHttpReceiver, right here: https://github.com/rhobs/observability-operator/blob/main/pkg/apis/monitoring/v1alpha1/types.go#L232.

@jlarriba
Copy link
Collaborator

Ah I see that you already realized while I was writing this, sorry.

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