Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: ksm metrics were getting duplicated in openshift env using in-cluster prometheus #3864

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

mittal-ishaan
Copy link
Collaborator

What does this PR change?

Adds default option for disabling emitting ksm metrics when using in-cluster prometheus in an openshift environment.

Does this PR rely on any other PRs?

No

How does this PR impact users? (This is the kind of thing that goes in release notes!)

Users installing kubecost in openshift environment using in-cluster prometheus will now not get degraded warning and will see correct number of CPU in openshift overview page.

Links to Issues or tickets this PR addresses or fixes

opencost/opencost-helm-chart#249

What risks are associated with merging this PR? What is required to fully test this PR?

No

How was this PR tested?

Installed kubecost in openshift environment with in-cluster prometheus. earlier was getting degraded warning after setting:

kubecostMetrics:
  emitKsmV1Metrics: false

the warning was gone and nothing else was affected(We were getting correct etls and cost was showing up in UI).

Have you made an update to documentation? If so, please provide the corresponding PR.

@mittal-ishaan mittal-ishaan merged commit 336c5fb into develop Feb 10, 2025
19 of 20 checks passed
@mittal-ishaan mittal-ishaan deleted the fix_duplicate_ksm_metrics_openshift branch February 10, 2025 21:02
@mittal-ishaan
Copy link
Collaborator Author

mittal-ishaan commented Feb 10, 2025

/cherry-pick v2.5

@mittal-ishaan
Copy link
Collaborator Author

/cherry-pick v2.6

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Feb 10, 2025
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Feb 10, 2025
mittal-ishaan added a commit that referenced this pull request Feb 10, 2025
…uster prometheus (#3864) (#3867)

Co-authored-by: Ishaan Mittal <ishaanmittal123@gmail.com>
mittal-ishaan added a commit that referenced this pull request Feb 10, 2025
…uster prometheus (#3864) (#3866)

Co-authored-by: Ishaan Mittal <ishaanmittal123@gmail.com>
@@ -24,3 +24,6 @@ serviceMonitor:

prometheusRule:
enabled: true

kubecostMetrics:

Choose a reason for hiding this comment

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

I daresay this should read kubeStateMetrics, not kubecostMetrics...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This should be kubecostMetrics
The helm config is different from the one that is present in opencost

kubecostMetrics:
# emitPodAnnotations: false
# emitNamespaceAnnotations: false
# emitKsmV1Metrics: true # emit all KSM metrics in KSM v1.
# emitKsmV1MetricsOnly: false # emit only the KSM metrics missing from KSM v2. Advanced users only.

jessegoodier added a commit that referenced this pull request Feb 11, 2025
…-v2.6

Revert "fix: ksm metrics were getting duplicated in openshift env using in-cluster prometheus (cherry-pick #3864)"
jessegoodier added a commit that referenced this pull request Feb 11, 2025
…-v2.5

Revert "fix: ksm metrics were getting duplicated in openshift env using in-cluster prometheus (cherry-pick #3864)"
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants