Template Quota Definition File: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:


* [[OpenShift_Concepts#Template|OpenShift Concepts]]
* [[OpenShift_Concepts#Template|OpenShift Concepts]]
=Example=
<pre>
{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "some-application",
    "creationTimestamp": null,
    "annotations": {
      "description": "Example",
      "iconClass": "icon-example",
      "tags": "example,mysql"
    }
  },
  "parameters": [ 
    {
      "name": "username"
      "value": "admin"
      "description": "administrative user"
    }
  ],
  "labels": { 
    "custom_label": "Label_Name"
  },
  "objects": [ 
    {
      ...
    }
  ]
}
</pre>


=Components=
=Components=
Line 44: Line 10:


==parameter==
==parameter==
Use to share configuration values between different objects in the template. The value is substituted wherever the parameter name is specified. The parameter can be used in any text field in the object definition.
===generate===
The value of the parameter will be generated based on the type of generator specified.
<pre>
parameters:
  - name: ...
    generate: expression
    from: "[a-zA-Z0-9]{12}"
</pre>


==labels==
==labels==

Latest revision as of 19:05, 23 November 2017

Internal

Components

metadata

name

parameter

Use to share configuration values between different objects in the template. The value is substituted wherever the parameter name is specified. The parameter can be used in any text field in the object definition.

generate

The value of the parameter will be generated based on the type of generator specified.

parameters:
   - name: ...
     generate: expression
     from: "[a-zA-Z0-9]{12}"

labels

List of labels to apply to every resource created by template.

objects

List of resources to create.