fix: Target Down for metrics monitor#1195
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds a ChangesSecure Metrics TLS
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
Signed-off-by: akhil nittala <nakhil@redhat.com>
67a3b53 to
b999418
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cmd/main.go`:
- Line 184: The metrics server setup is rebuilding the TLS options instead of
using the already computed tlsOpts, so the HTTPS metrics listener misses the
cluster TLS profile. Update the buildMetricsServerOptions call in main to pass
the existing tlsOpts slice (which already includes disableHTTP2 and any cluster
profile settings) rather than constructing a new one inline. Use the nearby
tlsOpts setup and buildMetricsServerOptions to locate the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 85d3d968-67d1-40ed-a855-878bbfb9b3a2
📒 Files selected for processing (6)
bundle/manifests/gitops-operator.clusterserviceversion.yamlbundle/manifests/openshift-gitops-operator-metrics-service_v1_service.yamlcmd/main.goconfig/default/manager_metrics_patch.yamlconfig/manager/manager.yamlconfig/rbac/metrics_service.yaml
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
argoproj-labs/argocd-operator(manual)
Signed-off-by: akhil nittala <nakhil@redhat.com>
|
/retest-required |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: svghadi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| volumes: | ||
| - name: metrics-certs | ||
| secret: | ||
| secretName: gitops-operator-metrics-tls |
There was a problem hiding this comment.
Should we keep the name as openshift-gitops-operator-metrics-tls and in other places ?
What type of PR is this?
/kind bug
What does this PR do / why we need it:
Target Down alerts are firing because of https handling is not happening as kube-rbac-proxy image has been deprecated. Implemented metrics monitor to work for https from prometheus scraping from controller main code.
Have you updated the necessary documentation?
Which issue(s) this PR fixes:
Fixes #?
https://redhat.atlassian.net/browse/GITOPS-10273
Test acceptance criteria:
How to test changes / Special notes to the reviewer: