openshift/openshift-restclient-python

Deploying a template with parameters.

dbrennand opened this issue · 3 comments

Is it possible to use the create() method to pass parameters to a template.yaml file?

I see the create method accepts kwargs. Are these passed as parameters to the template?

If you want templating I recommend using Ansible k8s module, which uses this library under the hood - I'm not sure there's an easy way to do it directly here

@dbrennand what sort of template is template.yaml? Is that an openshift template?

create won't do anything special with regards to templating, it will just package the arguments in a request and send it to the proper API. I'm not very familiar with the templates API unfortunately, but if there is a way to send the parameters to the API and have the openshift backend handle the templating that should be possible. If you need to do the templating locally and send the rendered template to the API then we don't have any utilities to assist with that at the moment.

If you need to do the templating locally and send the rendered template to the API then we don't have any utilities to assist with that at the moment.

This is my exact use case. Guess it's not possible. I have used another approach. Thank you both for the reply.