kubekutr
kubekutr copied to clipboard
Feature Request: Allow custom templates and overrides
It would be nice to make kubekutr
flexible to allow users to drop-in their own templates.
We have numerous 'shared' components such as mysqld-exporters
, mariadb
, which applications can reference as a base and patch/overlay as required.
It would be avoid the following:
- forking this repo to allow for custom templates (since this could happen regularly and will often be user specific)
- having to re-compile to pick up new templates
Not too sure in terms of code how this could work - but perhaps something like the following:
Specify directory containing additional templates
kubekutr -p /tmp/my-custom-templates`
Example directory layout
/tmp/my-custom-templates
├── mariadb
│ └── templates
│ └── deployment.tmpl
└── mysqld-exporter
└── templates
├── deployment.tmpl
└── ingress.tmpl
└── a-custom-resource.tmpl
_
Example config updates
mariadb:
deployment:
- name: app
replicas: 1
mysqld-exporter:
deployment:
- name: app
replicas: 1
a-custom-resource:
- name: app
The key here could be used as part of the path-lookup into the right directory.