Giter Site home page Giter Site logo

[Enhancement] Watch for certificates in subdirectories for path specified in "watchDirectories" attribute. about x509-certificate-exporter HOT 5 OPEN

enix avatar enix commented on May 20, 2024
[Enhancement] Watch for certificates in subdirectories for path specified in "watchDirectories" attribute.

from x509-certificate-exporter.

Comments (5)

porwalameet avatar porwalameet commented on May 20, 2024

If this enhancement is acceptable, I can pick it up and contribute for same.

from x509-certificate-exporter.

npdgm avatar npdgm commented on May 20, 2024

Hi @porwalameet

Sorry we didn't get back to you sooner. There have been other requests for this enhancement already, but your issue certainly revived the discussion on how we could implement that. Work is in progress.

Actually there was a good reason why this directory watch option never had recursion. It comes to the fact there is no identification of certificate files based on filenames, such as extensions: .crt, .pem, ... Crawling a large filesystem would instantiate the PEM parser for every single file, consuming memory and cpu resources, and probably taking too much time to answer scrape queries before the cache gets fed. And since we do not maintain the parser code which is from Golang, that's also an open door for regressions in performance or behaviour, should we rely too much on it for scanning content in tens of thousands of files likely found in a /var/lib/kubelet/pods/.
So it was a safeguard against configurations that would make the exporter behave poorly and likely far bellow user expectations.

Ultimately we'll need an optional configuration file to add many options to each file or directory path.
In the meantime this can be implemented in a limited form with CLI arguments. Such as giving a list of file extensions, or whole path globbing.

Let me sync up with my colleague who has been looking at that feature already, and I'll tell you what to expect.

from x509-certificate-exporter.

porwalameet avatar porwalameet commented on May 20, 2024

Thanks @npdgm. I do agree there will lot of files and parsing might take lot of memory based on pods running on a node. We can filter volumes directory specifically - like /var/lib/kubelet/pods/*/volumes, since such secrets/certificates will be volume mounted, so the scanning target is limited now, we can have such optimizations to narrow it down further. Just a thought.

from x509-certificate-exporter.

porwalameet avatar porwalameet commented on May 20, 2024

Hi @npdgm , just checking did you hear back anything on this feature/Enhancement.

from x509-certificate-exporter.

arcln avatar arcln commented on May 20, 2024

Hello, I am almost done implementing this into the exporter. Then we'll need to update the helm chart to be compatible with the changes, and then we'll release this feature. You can expect to see it released within 1-2 weeks.

from x509-certificate-exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.