Skip to content

fix: Target Down for metrics monitor#1195

Merged
openshift-merge-bot[bot] merged 3 commits into
redhat-developer:masterfrom
akhilnittala:usr/akhil/GITOPS-10273
Jun 30, 2026
Merged

fix: Target Down for metrics monitor#1195
openshift-merge-bot[bot] merged 3 commits into
redhat-developer:masterfrom
akhilnittala:usr/akhil/GITOPS-10273

Conversation

@akhilnittala

Copy link
Copy Markdown
Member

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?

  • Documentation update is required by this PR.
  • Documentation has been updated.

Which issue(s) this PR fixes:

Fixes #?
https://redhat.atlassian.net/browse/GITOPS-10273
Test acceptance criteria:

  • Unit Test
  • E2E Test

How to test changes / Special notes to the reviewer:

Deploy gitops operator with namespace having openshift.io/cluster-monitoring:'true' label on openshift-gitops-operator namespace
check alerts and target all are up.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: akhil nittala <nakhil@redhat.com>
@akhilnittala akhilnittala force-pushed the usr/akhil/GITOPS-10273 branch from 67a3b53 to b999418 Compare June 29, 2026 15:03

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 93a8216 and b999418.

📒 Files selected for processing (6)
  • bundle/manifests/gitops-operator.clusterserviceversion.yaml
  • bundle/manifests/openshift-gitops-operator-metrics-service_v1_service.yaml
  • cmd/main.go
  • config/default/manager_metrics_patch.yaml
  • config/manager/manager.yaml
  • config/rbac/metrics_service.yaml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • argoproj-labs/argocd-operator (manual)

Comment thread cmd/main.go Outdated
Signed-off-by: akhil nittala <nakhil@redhat.com>
@akhilnittala

Copy link
Copy Markdown
Member Author

/retest-required

svghadi
svghadi previously approved these changes Jun 30, 2026

@svghadi svghadi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci

openshift-ci Bot commented Jun 30, 2026

Copy link
Copy Markdown

[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

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

Comment thread bundle/manifests/gitops-operator.clusterserviceversion.yaml Outdated
@svghadi svghadi removed the lgtm label Jun 30, 2026
Signed-off-by: akhil nittala <nakhil@redhat.com>
Comment thread config/manager/manager.yaml

@svghadi svghadi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Jun 30, 2026
@akhilnittala

Copy link
Copy Markdown
Member Author

/retest-required

@svghadi

svghadi commented Jun 30, 2026

Copy link
Copy Markdown
Member

/test v4.14-images

@svghadi

svghadi commented Jun 30, 2026

Copy link
Copy Markdown
Member

/retest

@openshift-merge-bot openshift-merge-bot Bot merged commit fd47c94 into redhat-developer:master Jun 30, 2026
16 of 17 checks passed
@svghadi

svghadi commented Jun 30, 2026

Copy link
Copy Markdown
Member

/cherry-pick v1.21

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@svghadi: #1195 failed to apply on top of branch "v1.21":

Applying: fix: Target Down for metrics monitor
Using index info to reconstruct a base tree...
M	bundle/manifests/gitops-operator.clusterserviceversion.yaml
M	cmd/main.go
M	config/manager/manager.yaml
Falling back to patching base and 3-way merge...
Auto-merging bundle/manifests/gitops-operator.clusterserviceversion.yaml
CONFLICT (content): Merge conflict in bundle/manifests/gitops-operator.clusterserviceversion.yaml
Auto-merging cmd/main.go
CONFLICT (content): Merge conflict in cmd/main.go
Auto-merging config/manager/manager.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 fix: Target Down for metrics monitor

Details

In response to this:

/cherry-pick v1.21

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.

@svghadi svghadi mentioned this pull request Jul 1, 2026
4 tasks
svghadi added a commit that referenced this pull request Jul 1, 2026
* fix: Target Down for metrics monitor (#1195)

* fix: Target Down for metrics monitor

Signed-off-by: akhil nittala <nakhil@redhat.com>

* fix: Target Down for metrics monitor

Signed-off-by: akhil nittala <nakhil@redhat.com>

* fix: Target Down for metrics monitor

Signed-off-by: akhil nittala <nakhil@redhat.com>

---------

Signed-off-by: akhil nittala <nakhil@redhat.com>

* add missing tls options

Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>

---------

Signed-off-by: akhil nittala <nakhil@redhat.com>
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Co-authored-by: akhilnittala <nakhil@redhat.com>
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.

4 participants