Skip to content

Conversation

@kota2and3kan
Copy link
Collaborator

Description

This PR updates the default configuration of kube-state-metrics.

Basically, we assume that the ScalarDL Auditor Monitoring chart collects metrics from the same namespace only as itself is deployed (i.e, it collects metrics of ScalarDL Auditor that is deployed in the same namespace as ScalarDL Auditor Monitoring).

However, in the current default value, kube-state-metrics collects metrics from all namespaces. Also, it requires a bit stronger permissions that are applied by using ClusterRole.

This PR sets (limits) the target namespace to the same namespace only as itself is deployed, and disables deploying unnecessary ClusterRole.

Please take a look!

Related issues and/or PRs

N/A

Changes made

  • Set the target namespace to the release namespace only.
  • Disable deploying unnecessary ClusterRole.

Checklist

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

Release notes

N/A

@kota2and3kan kota2and3kan requested a review from Copilot May 8, 2025 00:57
@kota2and3kan kota2and3kan self-assigned this May 8, 2025
@kota2and3kan kota2and3kan added scalardl auditor PR for ScalarDL Auditor chart monitoring patch labels May 8, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the ScalarDL Auditor Monitoring chart configuration to restrict kube-state-metrics to the same namespace as the chart and to disable the deployment of an unnecessary ClusterRole.

  • Limit metrics collection to the release namespace.
  • Disable the use of ClusterRole for kube-state-metrics.
  • Update documentation to reflect the new configuration options.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
charts/scalardl-auditor-monitoring/values.yaml Added new configuration keys (releaseNamespace and rbac.useClusterRole) to limit permissions.
charts/scalardl-auditor-monitoring/README.md Updated documentation to include the new configuration options.
Files not reviewed (1)
  • charts/scalardl-auditor-monitoring/values.schema.json: Language not supported

Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@kota2and3kan kota2and3kan merged commit 0c97737 into main Jul 3, 2025
14 checks passed
@kota2and3kan kota2and3kan deleted the collect-metrics-from-same-namespace-scalardl-auditor branch July 3, 2025 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

monitoring patch scalardl auditor PR for ScalarDL Auditor chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants