Hey Galder,
That sounds like an interesting idea but let me give some more context and propose other options...
So during the first iteration I wanted to create templates inside OpenShift Template Library [1]. However it turned out that this repo works in a very specific way - it pulls templates from other repositories and puts them in one, single place. According to my knowledge there are plans to use it OpenShift Online (I can tell you more offline).
This is why I came up with a separate repository only for templates and image streams. When adding more and more features to the templates, my goal was to externalize configuration into a ConfigMap. This makes it very convenient for editing in OpenShift UI. The main problem is how to put it there? The easiest way was to hardcode it inside a template (and I decided to go that way). But a much more robust approach would be to spin up a small container (maybe an Init Container??) that would pull proper version of Infinispan and use Kubernetes REST API to create that ConfigMap on the fly.
I'm not sure if putting templates into Infinispan repository would solve our problems. Although granted, we would have an easy access to configuration but still providing custom Docker image [2] (possibly with custom configuration) is something I expect to happen frequently. Also I'm not a big fan of putting many bits in a single repository.
So having said that, I believe the proper way is to implement a small container (maybe an Init Container or just a script inside the same Docker image) responsible for unpacking desired Infinispan package and creating ConfigMap directly in Kubernetes.
WDYT?
Thanks,
Sebastian