<p>I was wondering if it is possible to use helm charts just to generate the k8s objects themselves.</p>

<p>We are using multiple k8s clusters with managed by <code>openshift</code>.<br>
Helm doesn't work so well with multiple openshift clusters,<br>
so we figured that using the <code>oc</code> would work better (mostly for authentication and authorization on multiple clusters).</p>

<p>Helm dynamic k8s objects are very powerful and we would like to keep using them.<br>
Is it possible to tell helm to generate the object from the given <code>yaml</code> files and <code>values</code> file, and pass them along to <code>oc replace</code>?</p>

<p>OpenShift has its own internal templating engine that overlaps significantly with helm, but is more tightly integrated.</p>

<p>You can find documentation on this in the <a href="https://docs.openshift.com/container-platform/3.11/dev_guide/templates.html" rel="nofollow noreferrer">Templates</a> section of the official OpenShift documentation.</p>

<p>When using these templates you can generate object definitions from a parameterized template by using the <code>oc process</code> command.</p>

<pre><code>$ oc process -f my-rails-postgresql \
    -p POSTGRESQL_USER=bob \
    -p POSTGRESQL_DATABASE=mydatabase
</code></pre>

<p>You can create the resulting objects in-line using <code>oc create</code></p>

<pre><code>$ oc process -f my-rails-postgresql \
    -p POSTGRESQL_USER=bob \
    -p POSTGRESQL_DATABASE=mydatabase \
    | oc create -f -
</code></pre>

<p>Personally I find helm to be overkill when using OpenShift as the out-of-the-box templating engine is usually sufficient.</p>

<p>If you need something more sophisticated than that I tend to reach towards packaging my deployment in an ansible playbook, jinja2 templates, and the <a href="https://docs.ansible.com/ansible/latest/modules/k8s_module.html" rel="nofollow noreferrer">k8s</a> ansible module instead of running helm and tiller.</p>
