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

feat: [PAYMCLOUD-198] Emit KSM V1 metrics on opencost module #399

Merged
merged 11 commits into from
Jan 10, 2025

Conversation

ffppa
Copy link
Contributor

@ffppa ffppa commented Jan 10, 2025

Description:

List of changes

  • Replaced hardcoded Helm chart version with a configurable variable opencost_helm_chart_version.
  • Improved flexibility for updating the Helm chart version without modifying main Terraform code.
  • Added a default value for the variable in 99_variables.tf.

Motivation and context

This change was made to enhance flexibility in managing the Helm chart version for Opencost deployments. By introducing a configurable variable, it becomes easier to update the version without the need to modify the main Terraform code.

Type of changes

  • Update existing module

Does this introduce a breaking change?

  • No

Other information

No additional information provided.

Run checks

Useful commands to run checks on a local machine

bash .utils/terraform_run_all.sh init local
pre-commit run -a

ffppa added 11 commits January 8, 2025 15:38
Added configuration to disable KSM V1 metrics while enabling KSM V1-only metrics for greater flexibility. This ensures compatibility with specific monitoring setups and cleaner metric management.
The change updates the Helm chart value for enabling the serviceMonitor by using the correct key. Additionally, the default project variable is modified from "cstar" to "pagopa" to reflect the updated project naming convention.
Switch the repository to the official OpenCost Helm chart and upgrade the version to 1.43.0. This change aligns with the latest updates and ensures compatibility with the OpenCost chart source.
Replaced the Prometheus OpenCost Exporter chart with the OpenCost chart in the Kubernetes configuration. This ensures alignment with the updated repository and the correct Helm chart for the deployment. Chart version remains configurable as needed.
Added the `opencost.defaultClusterId` parameter to Helm chart values, assigning it the AKS cluster name. This ensures proper identification of the cluster within OpenCost for accurate cost reporting.
Updated the configuration to disable the OpenCost UI and set `opencost.metrics.kubeStateMetrics.emitKsmV1MetricsOnly` to false. These changes aim to optimize performance and align with the updated usage requirements.
Removed an unintended trailing tab in the "emitKsmV1MetricsOnly" name. This ensures the configuration is correctly parsed and functions as expected.
Revert the OpenCost Helm chart version from 1.43.0 to 1.40.0. This change addresses compatibility issues or potential regressions introduced in the newer version.
Updated the Helm chart version from 1.40.0 to 1.43.0 to include the latest features, improvements, and bug fixes provided by OpenCost. This ensures the deployment stays up-to-date and aligns with best practices.
Updated the kubeStateMetrics setting to emit KSM v1 metrics by setting the value to "true". This ensures compatibility with systems relying on v1 metric outputs.
Replaced hardcoded Helm chart version with a configurable variable `opencost_helm_chart_version`. This improves flexibility and allows easier updates to the Helm chart version without modifying the main Terraform code. Added a default value for the variable in `99_variables.tf`.
@ffppa ffppa marked this pull request as ready for review January 10, 2025 15:04
@ffppa ffppa requested review from a team as code owners January 10, 2025 15:04
@ffppa ffppa merged commit 8e1de5c into main Jan 10, 2025
4 checks passed
@ffppa ffppa deleted the PAYMCLOUD-198-Emit-KSM-V1-metrics-opencost-module branch January 10, 2025 15:04
Copy link

🎉 This PR is included in version 8.71.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

1 participant