canonical / charmed-kubeflow-chisme

Shared Utilities used across Charmed Kubeflow
Apache License 2.0
2 stars 4 forks source link

Add a feature to `KubernetesResourceHandler` to reuse Jinja templates #90

Open NohaIhab opened 8 months ago

NohaIhab commented 8 months ago

Context

The current implementation of KubernetesResourceHandler has a limitation where using jinja's tags to reference a template from within another template, for example the include tag and the import tag. With this limitation, we resort to duplicating files as a workaround. See an example in this pr, look at katib-config.yaml.j2 and katib-config-configmap.yaml.j2 in the katib-controller templates.

What needs to get done

  1. Look into the usage of Jinja's tags
  2. Implement this feature in KubernetesResourceHandler
  3. Add an API in the base charm's kubernetes compontent
  4. Write tests for krh and the base charm

Definition of Done

chisme's KubernetesResourceHandler and the base charm's kubernetes component allow reusing of jinja templates, tests included.

syncronize-issues-to-jira[bot] commented 8 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-5441.

This message was autogenerated