joe-elliott / cert-exporter

A Prometheus exporter that publishes cert expirations on disk and in Kubernetes secrets
Apache License 2.0
316 stars 87 forks source link

Add ability to set multiple namespaces to search for secrets and configMaps #119

Closed Krasttt closed 1 year ago

Krasttt commented 2 years ago

Add ability to set multiple namespaces to search for secrets and configMaps.

Add new parameters:

  1. -secrets-list-of-namespaces - Kubernetes list of namespaces to search for secrets.
  2. -configmaps-list-of-namespaces -> Kubernetes list of namespaces to search for configmaps.

This parameters allow to set list of namespaces to search for secrets/configMaps. Example,

-secrets-list-of-namespaces="namespace_1,namespace_2,namespace_3" -configmaps-list-of-namespaces="namespace_1,namespace_2,namespace_3"

Open Issue - #73

joe-elliott commented 2 years ago

I really like this change, but I'd like to keep it backwards compatible by preserving the old CLI params.

Perhaps just concatenate any namespaces specified in both -secrets-namespace and -secrets-namespaces? (and do the same for the configmap params?)

Krasttt commented 2 years ago

I really like this change, but I'd like to keep it backwards compatible by preserving the old CLI params.

Perhaps just concatenate any namespaces specified in both -secrets-namespace and -secrets-namespaces? (and do the same for the configmap params?)

Done.

-secrets-namespace/-configmaps-namespace have marked as DEPRECATED

danielrozenblum commented 1 year ago

Hello @joe-elliott Using latest chart and version 2.10 but still didnt get it to work tried: -secrets-namespace="namespace_1,namespace_2" -secrets-namespaces="namespace_1,namespace_2" -secrets-list-of-namespaces="namespace_1,namespace_2"

but nothing works. it gives results only from the last namesapce I of the list

any fix for that?

Thank you