Terminology: I tend to call the YAML/JSON files used in `oc apply -f ...`: YAML Files, Object Files, Object Definition Files, API Object Files. OpenShift also has multiple concepts of Template Files in the form of jinja files (which produce YAML Files) and multiple API Object Files in a single file YAML file, and parameterized API Object Files that contain a `parameters:` section one or more API Object Definitions [0].
I find the latter especially useful. You can create an entire Application Lifecycle Landscape (DEV, QA, PROD) and the requisite API Objects (bc, dc, svc, etc.) in one call to `oc process -f ... | oc appy -f -` with full parameterization [1]. Every single API Object can be created this way, and, you can add them to the OpenShift project namespace `openshift` and make your templates available to other users of the cluster (using `oc create template -f myTemplate.yaml`). [0] https://docs.openshift.com/container-platform/3.6/dev_guide/templates.html#writing-templates [1] https://docs.openshift.com/container-platform/3.6/dev_guide/templates.html#generating-a-list-of-objects ___________________________________________________ LOUIS P. SANTILLAN SENIOR CONSULTANT, OPENSHIFT, MIDDLEWARE & DEVOPS Red Hat Consulting, NA US WEST <https://www.redhat.com/> [email protected] M: 3236334854 <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted> On Thu, Oct 19, 2017 at 8:39 AM, Tako Schotanus <[email protected]> wrote: > Hi, > > is it possible in some way to refer to actual runtime values from within > an OpenShift template (I'm calling it templates because I don't know the > official terminology. I'm referring to the json/yaml files that can be > applied using "oc apply" for example). > > What I'm really trying to do is to figure out what hostname was used for a > Route that was created using an earlier apply and use it in the template > that is to be applied. > > I'm guessing there's no such thing, but I want to make sure before coming > up with some kind of system ourselves to do replacements in template files. > > Thanks > > -- > > TAKO SCHOTANUS > > SENIOR SOFTWARE ENGINEER > > Red Hat > > <https://www.redhat.com/> > <https://red.ht/sig> > > > _______________________________________________ > users mailing list > [email protected] > http://lists.openshift.redhat.com/openshiftmm/listinfo/users > >
_______________________________________________ users mailing list [email protected] http://lists.openshift.redhat.com/openshiftmm/listinfo/users
