FairwindsOps / pentagon

A framework for building repeatable, containerized, cloud-based infrastructure as code with Kubernetes.
https://www.reactiveops.com
Apache License 2.0
183 stars 25 forks source link

Add support for custom jinja filters #170

Closed mjhuber closed 5 years ago

mjhuber commented 5 years ago

Implements #171

This PR adds support for custom jinja filters, and I added one custom filter, regex_trim. Custom filters are required for more complex templates like what would be required to implement reactiveops/rodd#1 and reactiveops/rodd#37. Any methods defined in filters.py with the @filter decorator will be loaded into the template environment for use.

CLAassistant commented 5 years ago

CLA assistant check
All committers have signed the CLA.

ejether commented 5 years ago

Adding support to for custom Jinja filters is fine but I don't think it will work to do what you want it to in RODD.

ejether commented 5 years ago

We talked offline and agreed that this is good work and worth adding to Pentagon Core but other work is required to implement the RODD issues. I'll move the work to implement the RODD prs over to: https://github.com/reactiveops/rodd/pull/46