Closed kimiyasharifi closed 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
Hey not see any activity. Closing feel free to reopen once changes are completed.
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.getMonitoredNamespaces(clientset *kubernetes.Clientset) ([]string, error)
now reads the label selector from theEPHEMERAL_STORAGE_LABEL
env var.setMetrics(clientset *kubernetes.Clientset, nodeName string, monitoredNamespaces map[string]bool)
now receives a map of monitored ns to check if a pod’s ns is in the monitored list.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 totrue
. This logic is implemented in thegetMonitoredNamespaces
function.