Configure MCP server Prometheus/metric-storage connection on RHOSO 18 - #96
omkarjoshi0304 wants to merge 1 commit into
Conversation
On RHOSO 18 the metric-storage service is not registered in the Keystone catalog, so the observabilityclient running inside the rhoso-mcps sidecar cannot auto-discover Aetos/Prometheus and metric commands fail. Detect a telemetry MetricStorage CR in the OpenStackControlPlane namespace during MCP reconciliation and, when found, render its connection details (host/port, and CA cert path when Prometheus TLS is enabled) into the openstack.prometheus section of the rendered config.yaml. When no MetricStorage is found, the section is omitted so the MCP server can report a clear "not configured" error instead of pointing at a nonexistent host.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: omkarjoshi0304 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openstack-k8s-operators/lightspeed-operator/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughThe controller can read the default telemetry ChangesPrometheus MCP configuration
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant OpenStackLightspeedReconciler
participant MetricStorageAPI
participant MCPDeployment
participant MCPConfigMap
participant MCPConfigTemplate
OpenStackLightspeedReconciler->>MetricStorageAPI: Read default MetricStorage
MetricStorageAPI-->>OpenStackLightspeedReconciler: Prometheus settings or absent resource
OpenStackLightspeedReconciler->>MCPDeployment: Pass optional Prometheus parameters
MCPDeployment->>MCPConfigMap: Build MCP server ConfigMap
MCPConfigMap->>MCPConfigTemplate: Render Prometheus configuration
Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 26.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 6 files. (2 skipped: 2 unsupported.) Full details: Keep Documentation CurrentExplanation The pull request changes user-visible MCP behavior but does not update documentation. The controller now detects a Resolution Update the applicable documentation, at minimum
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Proof of testing Command :- Output of metric list:- |
|
Build succeeded (check pipeline). ✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 46m 12s |
On RHOSO 18 the metric-storage service is not registered in the Keystone catalog, so the observabilityclient running inside the rhoso-mcps sidecar cannot auto-discover Aetos/Prometheus and metric commands fail.
Detect a telemetry MetricStorage CR in the OpenStackControlPlane namespace during MCP reconciliation and, when found, render its connection details (host/port, and CA cert path when Prometheus TLS is enabled) into the openstack.prometheus section of the rendered config.yaml. When no MetricStorage is found, the section is omitted so the MCP server can report a clear "not configured" error instead of pointing at a nonexistent host.
Summary by CodeRabbit