Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix openshift values to default with in-cluster prometheus #3721

Merged
merged 22 commits into from
Nov 26, 2024

Conversation

mittal-ishaan
Copy link
Contributor

@mittal-ishaan mittal-ishaan commented Oct 25, 2024

What does this PR change?

  • This PR adds an example values file to have default properties set to deploy kubecost with in-cluster prometheus. (As this is what most users want)
  • Add the general configurations to default values file and remove unnecessary configurations and comments from openshift and openshift prometheus example values file.
  • Adds clarifying comment in the template while binding the cluster role to the kubecost service account
  • Moves in-cluster prometheus service account namespace name to values to make it more generalized and to cover the case where it can be of any other name.

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!)

Added standard configuration template for openshift to use the openshift-monitoring prometheus and cleaned up openshift example values file.

Links to Issues or tickets this PR addresses or fixes

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

No risk, Testing that it gets deployed on openshift cluster easily and successfully need to be done.

How was this PR tested?

Installing kubecost in openshift environment with network cost enabled without helm hook:
Screenshot from 2024-10-26 02-54-50
Installing with pre-install helm hook
Screenshot from 2024-10-26 02-59-27
Resulting kubecost diagnostics page
image

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

Copy link
Collaborator

@chipzoller chipzoller left a comment

Choose a reason for hiding this comment

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

I'm wondering if this is the right approach (on by default) as it deviates from our standard architecture. How extensively has this been tested? Do you have any concerns here, @jessegoodier and @kwombach12 ?

@jessegoodier
Copy link
Collaborator

I'm wondering if this is the right approach (on by default) as it deviates from our standard architecture. How extensively has this been tested? Do you have any concerns here, @jessegoodier and @kwombach12 ?

This is what users are asking for, and I do think it is the best architecture.

A consistent configuration will reduce support concerns with openshift- in comparison to what we have seen with the various custom configs attempted.

Historically, issues with prometheus are due to misconfiguration, not version.

@jessegoodier jessegoodier added v2.5 enhancement New feature or request labels Oct 27, 2024
@thomasvn
Copy link
Member

Also any new configurations that you've added into values-openshift.yaml should also be in values.yaml. Helm will always use the values.yaml as the default configuration for the app (docs ref).

For example the following install command will use all default values from the values.yaml in the chart:

helm install kubecost cost-analyzer \
--repo https://kubecost.github.io/cost-analyzer/ \
--namespace kubecost --create-namespace

@mittal-ishaan mittal-ishaan force-pushed the openshift-prometheus-fix branch from 3a7e135 to b5458b3 Compare November 6, 2024 19:42
@mittal-ishaan mittal-ishaan force-pushed the openshift-prometheus-fix branch from b5458b3 to 58a7eb6 Compare November 14, 2024 16:06
@thomasvn
Copy link
Member

@mittal-ishaan and I discussed this PR on a call. We made the following changes together:

  • The values.yaml should be the source of truth, and should capture all possible configurations. It should also contain detailed documentation on what each of the configurations do.
  • The values-openshift.yaml is an example of the minimal set of configurations needed to deploy Kubecost on OpenShift assuming you are also deploying Kubecost's bundled Prometheus
  • The values-openshift-cluster-prometheus.yaml is an example of the minimal set of configurations needed to deploy Kubecost on OpenShift assuming you are leveraging a Prometheus instance which already exists in the cluster.

@mittal-ishaan mittal-ishaan merged commit 44cb68f into develop Nov 26, 2024
20 checks passed
@mittal-ishaan mittal-ishaan deleted the openshift-prometheus-fix branch November 26, 2024 10:18
@thomasvn
Copy link
Member

@mittal-ishaan @jessegoodier I think we should cherry-pick this into the v2.5 branch so that it gets released with v2.5.0? Thoughts?

@jessegoodier
Copy link
Collaborator

100%

@mittal-ishaan
Copy link
Contributor Author

/cherry-pick v2.5

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Nov 26, 2024
* fix openshift values to default with in-cluster prometheus

* improve openshift values example and make default values as one source of truth
jessegoodier added a commit that referenced this pull request Nov 26, 2024
…3750)

* fix openshift values to default with in-cluster prometheus

* improve openshift values example and make default values as one source of truth

Co-authored-by: Ishaan Mittal <[email protected]>
Co-authored-by: Jesse Goodier <[email protected]>
cliffcolvin pushed a commit that referenced this pull request Nov 27, 2024
* fix openshift values to default with in-cluster prometheus

* improve openshift values example and make default values as one source of truth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants