x509-certificate-exporter
x509-certificate-exporter copied to clipboard
Have a regex search for certificate files
While using the x509-cert-exporter, we realized that if the exporter is not able to read files it will report read_errors which is expected.
I see that there are 2 arg options right now available, either point to the exact file or directory. It will be great if we have an option to provide regex to search certificate files in a directory and read only them rather than reading other files ( say for example we have .key files in the same directory ) and reporting read errors
If you can assign this ticket to me, i can implement this feature
Hi @AnuragEkkati You are right this feature is lacking!
How would you see filters be added to arguments? A single regexp pattern applied to all target directories may not be flexible enough. Perhaps it could be appended to each path this way?
--watch-dir=/etc/ssl/certs
--watch-dir=/etc/app=\.crt$
Assigning ticket now, thanks a lot for offering help. Going with per path regexp may require some refactoring though.
Cheers
Hello,
It seems that the feature was introduced in 3.0.7, it works well for me. The doc/readme was not updated though.
(cc. @arcln as its the one who implemented the feature)