Skip to content

Instantly share code, notes, and snippets.

@ALRubinger
Created December 11, 2018 17:17
Show Gist options
  • Save ALRubinger/9b355381e73cac89941ff21ad3c922cf to your computer and use it in GitHub Desktop.
Save ALRubinger/9b355381e73cac89941ff21ad3c922cf to your computer and use it in GitHub Desktop.
$ oc process --local -f openshift/launcher-template.yaml --param-file=released.properties -o yaml | oc create -f - > ~/Desktop/oc-process
Error: unknown flag: --local
Usage:
oc process (TEMPLATE | -f FILENAME) [-v=KEY=VALUE] [options]
Examples:
# Convert template.json file into resource list and pass to create
oc process -f template.json | oc create -f -
# Process template while passing a user-defined label
oc process -f template.json -l name=mytemplate
# Convert stored template into resource list
oc process foo
# Convert stored template into resource list by setting/overriding parameter values
oc process foo PARM1=VALUE1 PARM2=VALUE2
# Convert template stored in different namespace into a resource list
oc process openshift//foo
# Convert template.json into resource list
cat template.json | oc process -f -
Options:
-f, --filename='': Filename or URL to file to read a template
-l, --labels='': Label to set in all resources for this template
-o, --output='json': Output format. One of: describe|json|yaml|name|template|templatefile.
--output-version='': Output the formatted object with the given version (default api-version).
--parameters=false: Do not process but only print available parameters
--raw=false: If true output the processed template instead of the template's objects. Implied by -o describe
-t, --template='': Template string or path to template file to use when -o=template or -o=templatefile. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]
-v, --value=[]: Specify a key-value pair (eg. -v FOO=BAR) to set/override a parameter value in the template.
Use "oc options" for a list of global command-line options (applies to all commands).
error: no objects passed to create
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment