Using workloadType
is covered in section 3. Component Model, but workload type definitions are described here.
Workload types are provided by the platform (just as traits are) so that users may inspect the platform and learn what workload types are available for use. Workload types are not extensible to platform users (only to platform operators). Thus, platform users MUST NOT be allowed to create new workload types.
These attributes provide top-level information about the workload type.
Attribute | Type | Required | Default Value | Description |
---|---|---|---|---|
apiVersion |
string |
Y | The specific version of the specification in use. The core types use core.oam.dev/v1alpha1 |
|
kind |
string |
Y | The string WorkloadType |
|
metadata |
Metadata |
Y | WorkloadType metadata. | |
spec |
Spec |
Y | A container for exposing the workload type definition. |
The metadata describes this workload type. The metadata section is defined in Section 3.
The specification describes how to declare that a component is bound to a workload type. In addition, it exposes which settings are configurable on the underlying workload runtime.
Attribute | Type | Required | Default Value | Description |
---|---|---|---|---|
group |
string |
Y | The group that this workload type belongs to (e.g. core.oam.dev ) |
|
names |
Names |
Y | Information about the names associated with this workload type | |
settings |
[]Setting |
N | The workload type's settings options. |
The format of group
is described in the Group, Version, Kind section of part 2
This section describes the different naming references for this kind.
Attribute | Type | Required | Default Value | Description |
---|---|---|---|---|
kind |
string |
Y | The proper reference name of the workload type (e.g., Server ) |
|
singular |
string |
N | The singular human-readable name of this type (e.g., server ) |
|
plural |
string |
N | The plural human-readable name of this type (e.g., servers ) |
kind
must begin with a capital letter, and contain only characters 0030-0039, 0041-005a, and 0061-007a from the Unicode basic Latin characters.
singular
and plural
can only contain characters from Unicode basic Latin 0030-0039 and 0061-007a.
Settings describe which pieces of a workload type are configurable.
Attribute | Type | Required | Default Value | Description |
---|---|---|---|---|
name |
string |
Y | The setting's name. Must be unique per workload type. | |
description |
string |
N | A description of the setting. | |
type |
string |
Y | The setting's type (One of string , boolean , number ). |
|
required |
boolean |
N | false |
Whether a value must be provided for the setting. |
default |
type indicated by type field |
N | The setting's default value. |
The name
field allows Unicode letters, numbers and _
and -
. The description
field allows those characters plus whitespace and punctuation characters.
Previous | Next |
---|---|
6. Application Configuration | 8. Practical Considerations |