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

[bitnami/mongodb] feat: allow setting targetLabel and podTargetLabels array on ServiceMonitor #30531

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

umarhussain15
Copy link

Description of the change

This update to MongoDB chart will allow users to set targetLabels and podTargetLabels arrays on ServiceMonitor resource in the chart. By default, the arrays are set empty and there is a check in the ServiceMonitor file to only put these array if they are set and array is not empty.

Spec ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#servicemonitorspec

Benefits

Allows users to further enrich Prometheus metrics with new labels when they are scraped by the server.

Possible drawbacks

None

Applicable issues

None

Additional information

Checklist

  • Chart version bumped in Chart.yaml according to semver. This is not necessary when the changes only affect README.md files.
  • Variables are documented in the values.yaml and added to the README.md using readme-generator-for-helm
  • Title of the pull request follows this pattern [bitnami/<name_of_the_chart>] Descriptive title
  • All commits signed off and in agreement of Developer Certificate of Origin (DCO)

@github-actions github-actions bot added mongodb triage Triage is needed labels Nov 19, 2024
@carrodher carrodher added verify Execute verification workflow for these changes in-progress labels Nov 19, 2024
@github-actions github-actions bot removed the triage Triage is needed label Nov 19, 2024
@github-actions github-actions bot removed the request for review from javsalgar November 19, 2024 20:16
Copy link
Member

@migruiz4 migruiz4 left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution @umarhussain15!

Changes look good to me, but I can not accept this PR until the changes to the values.schema.json have been reverted.

We have had issues in the past where having an schema that fully covers the values.yaml is 'too strict' and ends up causing severe issues with many values, especially those that are rendered as template or allow different value types (string/array/object).

bitnami/mongodb/values.schema.json Outdated Show resolved Hide resolved
…els` array on ServiceMonitor

This will allow chart users to include additional labels to prometheus metrics collected on mongodb

Signed-off-by: Umar Hussain <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress mongodb verify Execute verification workflow for these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants