Skip to content

[prometheus-blackbox-exporter] Adjust configPath handling #4915

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

Closed

Conversation

Jakob3xD
Copy link
Contributor

What this PR does / why we need it

Issue
I want to deploy the config map for the Blackbox config on my own, as I want to write some logic that adjust the ConfigMap more dynamically. Therefore I need to null the config value as otherwise the ConfigMap is created with the default chart values. When setting config to null the config path is set to /etc/blackbox_exporter/config.yml which does not exist.

Changes
I changed the config path logic to match the one of the config reloader. If no configPath is set, we use the default of /config/blackbox.yaml otherwise we use the configPath value. The default value of /etc/blackbox_exporter/config.yml gets removed as I don´t see the point in keeping it. If needed it can be set via configPath.

As it its a breaking change, I also bumped the version.

Which issue this PR fixes

None

Special notes for your reviewer

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

{{- else }}
- "--config.file=/etc/blackbox_exporter/config.yml"
{{- end }}
- --config.file={{ .Values.configPath | default "/config/blackbox.yaml" }}
Copy link
Member

@monotek monotek Nov 6, 2024

Choose a reason for hiding this comment

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

As this is a major update anyway we might think about to rename the var to .Values.configFile too.
Imho this fits better as the var currently contains a filename and not only the path.
Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am really sorry for the late response. I lost track of the PR.

You are correct, that naming it configPath would match its actual purpose.

Copy link
Member

@monotek monotek Feb 11, 2025

Choose a reason for hiding this comment

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

But the file does exist in the docker image: https://github.com/prometheus/blackbox_exporter/blob/master/Dockerfile#L9C1-L9C49
So i would keep the old default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, I was looking at the wrong container (config reloader).

I'll close the PR. However, I am asking if config reloader should be removed if no config and no config Path is set, as it wouldn't do anything.

Copy link

stale bot commented Feb 1, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

@stale stale bot added the lifecycle/stale label Feb 1, 2025
@stale stale bot removed the lifecycle/stale label Feb 10, 2025
@Jakob3xD Jakob3xD force-pushed the jh-blackbox-configPath branch from 04baa2b to b6a7af0 Compare February 10, 2025 08:23
@Jakob3xD Jakob3xD closed this Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants