Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 5. TemplateInstance [template.openshift.io/v1]
- Description
TemplateInstance requests and records the instantiation of a Template. TemplateInstance is part of an experimental API.
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
- Type
-
object
- Required
-
spec
-
5.1. Specification
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| metadata is the standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata | |
|
| TemplateInstanceSpec describes the desired state of a TemplateInstance. |
|
| TemplateInstanceStatus describes the current state of a TemplateInstance. |
5.1.1. .spec
- Description
- TemplateInstanceSpec describes the desired state of a TemplateInstance.
- Type
-
object
- Required
-
template
-
Property | Type | Description |
---|---|---|
|
| TemplateInstanceRequester holds the identity of an agent requesting a template instantiation. |
| secret is a reference to a Secret object containing the necessary template parameters. | |
|
| Template contains the inputs needed to produce a Config. Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). |
5.1.2. .spec.requester
- Description
- TemplateInstanceRequester holds the identity of an agent requesting a template instantiation.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| extra holds additional information provided by the authenticator. |
|
| |
|
| groups represent the groups this user is a part of. |
|
| uid is a unique value that identifies this user across time; if this user is deleted and another user by the same name is added, they will have different UIDs. |
|
| username uniquely identifies this user among all active users. |
5.1.3. .spec.requester.extra
- Description
- extra holds additional information provided by the authenticator.
- Type
-
object
5.1.4. .spec.template
- Description
Template contains the inputs needed to produce a Config.
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
- Type
-
object
- Required
-
objects
-
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
|
| labels is a optional set of labels that are applied to every object during the Template to Config transformation. |
|
| message is an optional instructional message that will be displayed when this template is instantiated. This field should inform the user how to utilize the newly created resources. Parameter substitution will be performed on the message before being displayed so that generated credentials and other parameters can be included in the output. |
| metadata is the standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata | |
| objects is an array of resources to include in this template. If a namespace value is hardcoded in the object, it will be removed during template instantiation, however if the namespace value is, or contains, a ${PARAMETER_REFERENCE}, the resolved value after parameter substitution will be respected and the object will be created in that namespace. | |
|
| parameters is an optional array of Parameters used during the Template to Config transformation. |
|
| Parameter defines a name/value variable that is to be processed during the Template to Config transformation. |
5.1.5. .spec.template.parameters
- Description
- parameters is an optional array of Parameters used during the Template to Config transformation.
- Type
-
array
5.1.6. .spec.template.parameters[]
- Description
- Parameter defines a name/value variable that is to be processed during the Template to Config transformation.
- Type
-
object
- Required
-
name
-
Property | Type | Description |
---|---|---|
|
| Description of a parameter. Optional. |
|
| Optional: The name that will show in UI instead of parameter 'Name' |
|
| From is an input value for the generator. Optional. |
|
| generate specifies the generator to be used to generate random string from an input value specified by From field. The result string is stored into Value field. If empty, no generator is being used, leaving the result Value untouched. Optional. The only supported generator is "expression", which accepts a "from" value in the form of a simple regular expression containing the range expression "[a-zA-Z0-9]", and the length expression "a{length}". Examples: from | value ----------------------------- "test[0-9]{1}x" | "test7x" "[0-1]{8}" | "01001100" "0x[A-F0-9]{4}" | "0xB3AF" "[a-zA-Z0-9]{8}" | "hW4yQU5i" |
|
| Name must be set and it can be referenced in Template Items using ${PARAMETER_NAME}. Required. |
|
| Optional: Indicates the parameter must have a value. Defaults to false. |
|
| Value holds the Parameter data. If specified, the generator will be ignored. The value replaces all occurrences of the Parameter ${Name} expression during the Template to Config transformation. Optional. |
5.1.7. .status
- Description
- TemplateInstanceStatus describes the current state of a TemplateInstance.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| conditions represent the latest available observations of a TemplateInstance’s current state. |
|
| TemplateInstanceCondition contains condition information for a TemplateInstance. |
|
| Objects references the objects created by the TemplateInstance. |
|
| TemplateInstanceObject references an object created by a TemplateInstance. |
5.1.8. .status.conditions
- Description
- conditions represent the latest available observations of a TemplateInstance’s current state.
- Type
-
array
5.1.9. .status.conditions[]
- Description
- TemplateInstanceCondition contains condition information for a TemplateInstance.
- Type
-
object
- Required
-
type
-
status
-
lastTransitionTime
-
reason
-
message
-
Property | Type | Description |
---|---|---|
| LastTransitionTime is the last time a condition status transitioned from one state to another. | |
|
| Message is a human readable description of the details of the last transition, complementing reason. |
|
| Reason is a brief machine readable explanation for the condition’s last transition. |
|
| Status of the condition, one of True, False or Unknown. |
|
| Type of the condition, currently Ready or InstantiateFailure. |
5.1.10. .status.objects
- Description
- Objects references the objects created by the TemplateInstance.
- Type
-
array
5.1.11. .status.objects[]
- Description
- TemplateInstanceObject references an object created by a TemplateInstance.
- Type
-
object
Property | Type | Description |
---|---|---|
| ref is a reference to the created object. When used under .spec, only name and namespace are used; these can contain references to parameters which will be substituted following the usual rules. |
5.2. API endpoints
The following API endpoints are available:
/apis/template.openshift.io/v1/templateinstances
-
GET
: list or watch objects of kind TemplateInstance
-
/apis/template.openshift.io/v1/watch/templateinstances
-
GET
: watch individual changes to a list of TemplateInstance. deprecated: use the 'watch' parameter with a list operation instead.
-
/apis/template.openshift.io/v1/namespaces/{namespace}/templateinstances
-
DELETE
: delete collection of TemplateInstance -
GET
: list or watch objects of kind TemplateInstance -
POST
: create a TemplateInstance
-
/apis/template.openshift.io/v1/watch/namespaces/{namespace}/templateinstances
-
GET
: watch individual changes to a list of TemplateInstance. deprecated: use the 'watch' parameter with a list operation instead.
-
/apis/template.openshift.io/v1/namespaces/{namespace}/templateinstances/{name}
-
DELETE
: delete a TemplateInstance -
GET
: read the specified TemplateInstance -
PATCH
: partially update the specified TemplateInstance -
PUT
: replace the specified TemplateInstance
-
/apis/template.openshift.io/v1/watch/namespaces/{namespace}/templateinstances/{name}
-
GET
: watch changes to an object of kind TemplateInstance. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
-
/apis/template.openshift.io/v1/namespaces/{namespace}/templateinstances/{name}/status
-
GET
: read status of the specified TemplateInstance -
PATCH
: partially update status of the specified TemplateInstance -
PUT
: replace status of the specified TemplateInstance
-
5.2.1. /apis/template.openshift.io/v1/templateinstances
- HTTP method
-
GET
- Description
- list or watch objects of kind TemplateInstance
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
5.2.2. /apis/template.openshift.io/v1/watch/templateinstances
- HTTP method
-
GET
- Description
- watch individual changes to a list of TemplateInstance. deprecated: use the 'watch' parameter with a list operation instead.
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
5.2.3. /apis/template.openshift.io/v1/namespaces/{namespace}/templateinstances
- HTTP method
-
DELETE
- Description
- delete collection of TemplateInstance
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
GET
- Description
- list or watch objects of kind TemplateInstance
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
POST
- Description
- create a TemplateInstance
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
202 - Accepted |
|
401 - Unauthorized | Empty |
5.2.4. /apis/template.openshift.io/v1/watch/namespaces/{namespace}/templateinstances
- HTTP method
-
GET
- Description
- watch individual changes to a list of TemplateInstance. deprecated: use the 'watch' parameter with a list operation instead.
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
5.2.5. /apis/template.openshift.io/v1/namespaces/{namespace}/templateinstances/{name}
Parameter | Type | Description |
---|---|---|
|
| name of the TemplateInstance |
- HTTP method
-
DELETE
- Description
- delete a TemplateInstance
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
HTTP code | Reponse body |
---|---|
200 - OK |
|
202 - Accepted |
|
401 - Unauthorized | Empty |
- HTTP method
-
GET
- Description
- read the specified TemplateInstance
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update the specified TemplateInstance
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
401 - Unauthorized | Empty |
- HTTP method
-
PUT
- Description
- replace the specified TemplateInstance
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
401 - Unauthorized | Empty |
5.2.6. /apis/template.openshift.io/v1/watch/namespaces/{namespace}/templateinstances/{name}
Parameter | Type | Description |
---|---|---|
|
| name of the TemplateInstance |
- HTTP method
-
GET
- Description
- watch changes to an object of kind TemplateInstance. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
5.2.7. /apis/template.openshift.io/v1/namespaces/{namespace}/templateinstances/{name}/status
Parameter | Type | Description |
---|---|---|
|
| name of the TemplateInstance |
- HTTP method
-
GET
- Description
- read status of the specified TemplateInstance
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update status of the specified TemplateInstance
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
401 - Unauthorized | Empty |
- HTTP method
-
PUT
- Description
- replace status of the specified TemplateInstance
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
401 - Unauthorized | Empty |