This is a cache of https://docs.openshift.com/dedicated/3/dev_guide/create_from_url.html. It is a snapshot of the page at 2024-11-22T05:04:15.781+0000.
Create from URL | Developer Guide | OpenShift Dedicated 3
×

Overview

Create From URL is a function that allows you to construct a URL from an image stream, image tag, or template.

Create from URL only works with image streams or templates from namespaces that have been explicitly whitelisted. The whitelist contains the openshift namespace by default.

You can define custom buttons.

Run on OpenShift Buttons

These buttons leverage a defined URL pattern with an appropriate query string. The user is prompted to select the project. Then, the Create from URL workflow continues.

Using an Image Stream and Image Tag

Query String Parameters

Name Description Required Schema Default

imageStream

The value metadata.name as defined in the image stream to be used.

true

string

imageTag

The value spec.tags.name as defined in the image stream to be used.

true

string

namespace

The name of the namespace containing the image stream and image tag to use.

false

string

openshift

name

Identifies the resources created for this application.

false

string

sourceURI

The Git repository URL containing the application source code.

false

string

sourceRef

The branch, tag, or commit for the application source code specified in sourceURI.

false

string

contextDir

The subdirectory for the application source code specified in sourceURI, used as the context directory for the build.

false

string

Reserved characters in parameter values should be URL encoded.

Example

 create?imageStream=nodejs&imageTag=4&name=nodejs&sourceURI=https%3A%2F%2Fgithub.com%2Fopenshift%2Fnodejs-ex.git&sourceRef=master&contextDir=%2F

Using a Template

Query String Parameters

Name Description Required Schema Default

template

The value of metadata.name as defined in the template to be used.

true

string

templateParamsMap

A JSON parameters map containing the template parameter name and corresponding value you wish to override.

false

JSON

namespace

The name of the namespace containing the template to use.

false

string

openshift

Reserved characters in parameter values should be URL encoded.

Example

 create?template=nodejs-mongodb-example&templateParamsMap={"SOURCE_REPOSITORY_URL"%3A"https%3A%2F%2Fgithub.com%2Fopenshift%2Fnodejs-ex.git"}