jmcgrath207 / k8s-ephemeral-storage-metrics

Prometheus ephemeral storage metrics exporter
https://jmcgrath207.github.io/k8s-ephemeral-storage-metrics/
MIT License
85 stars 35 forks source link

Add/expose metrics only specific ns #94

Closed kimiyasharifi closed 2 months ago

kimiyasharifi commented 3 months ago

This pull request introduces changes to enable the exporter to expose metrics only for ns labeled with specific label. Introduced a new env var EPHEMERAL_STORAGE_LABEL to specify the label selector for ns to monitor.

Additionally, this pull request adds the capability to expose metrics for all namespaces by default, unless a specific environment variable, ENABLE_SPECIFIC_NAMESPACE_MONITORING, is set to true. This logic is implemented in the getMonitoredNamespaces function.

jmcgrath207 commented 2 months ago

Hi @kimiyasharifi, thanks for you pull request. Overall I am for this feature, but we do need to revert of some changes. I will annotate those now.

I also enabled the e2e test on this PR incase you can't run the test local. Currently it's failing due to the

https://github.com/jmcgrath207/k8s-ephemeral-storage-metrics/actions/runs/9428091753/job/25976673651?pr=94#step:6:8

jmcgrath207 commented 2 months ago

Hey not see any activity. Closing feel free to reopen once changes are completed.