Giter Club home page Giter Club logo

Comments (1)

hjacobs avatar hjacobs commented on September 26, 2024

New customization hooks are available (documented in README):

  • --prerender-hook: function to modify the HTML template context, e.g. to add arbitrary links. Example usage (built-in): --prerender-hook=kube_resource_report.example_hooks.prerender.
  • --map-node-hook: function to map Kubernetes Node objects and enrich them (e.g. with custom pricing). Example usage (built-in): --map-node-hook=kube_resource_report.example_hooks.map_node.
  • --map-pod-hook: function to map Kubernetes Pod objects and enrich them (e.g. applying a custom logic to set the application). Example usage (built-in): --map-pod-hooks=kube_resource_report.example_hooks.map_pod.

The hooks are Python functions which you need to define in a module (e.g. hooks.py). The module can either be added to the Dockerfile or mounted as a volume.
Reference the functions via {module-name}.{function-name}, e.g. --map-pod-hook=hooks.map_pod if you defined the map_pod function in hooks.py.

See provided example hooks: https://github.com/hjacobs/kube-resource-report/blob/master/kube_resource_report/example_hooks.py

from kube-resource-report.

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.