Attributes of Resource Meta Section¶
Following attributes are declared for every instance of a Resource that is deployed in a DataOS context. Some of these attributes/fields need to mandatorily declared, while others are optional.
Resource Section Configuration Syntax¶
name: ${{myfirstresource}}
version: v1
type: ${{resource-type}}
tags:
- ${{example-resource}}
- ${{dataos:workspace:curriculum}}
description: ${{common attributes applicable to all dataos resources}}
owner: ${{iamgroot}}
layer: ${{user}}
<resource-type>:
Configuration Attributes¶
name
¶
Description: Declare a name for the Resource
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
string | mandatory | none |
|
Additional information: two resources in the same workspace cannot have the same name.
Example usage:
version
¶
Description: The version of the Resource
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
string | mandatory | none | v1, v1beta, v1alpha, v2alpha |
Example usage:
type
¶
Description: Provide the value for the Resource-type
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
string | mandatory | none | cluster, compute, depot, policy, secret, service, stack or workflow |
Example usage:
tags
¶
Description: Assign tags to the Resource-instance
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
mapping | mandatory | none | any string; special characters are allowed |
Example usage:
description
¶
Description: Assign description to Resource
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
string | optional | none | any string |
Additional information: the description can be within quotes or without.
YAML supports scalars such as strings, numbers, booleans, and null. A scalar value can be unquoted, within single quotes (') or double quotes ("). When the scalar contains a special character, the value must be declared within quotes.
Example usage:
owner
¶
Description: Identification of the user
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
string | optional | id of the user applying the Resource | any valid dataos user id |
Additional information: when no id is provided, or an incorrect id is provided, the system automatically corrects it to the id of the user who applied the Resource on DataOS CLI
Example usage:
layer
¶
Description: Declare the name of the layer in which Resource is going to be deployed
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
string | optional | user | user/system |
Additional information:
From a user's perspective, the operating system can be envisaged as working at two levels - user layer & system layer. This is only a logical separation to understand the workings of the system.
Example usage:
<resource-type>
¶
Description: Specifies attributes specific to a \<resource-type>
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
mapping | mandatory | none |
|
By declaring the type of the Resource, say
workflow:
, followed by a space, we are basically creating a mapping in YAML. To know about the key-value pairs within each mapping, go through the pages of respective DataOS Resources.
Example usage:
cluster:
{cluster-specific-attributes}
or
workflow:
{workflow-specific-attributes}
# all resource-types are created in the same manner
The table below summarizes how the values for version
, type
& layer
are declared for different types of Resources.
Resource | version | type | layer | <resource-type> |
---|---|---|---|---|
Cluster | v1 | cluster | not required | cluster |
Compute | v1beta | compute | system | compute |
Depot | v1 | depot | user | depot |
Policy | v1 | policy | user/system | policy |
Secret | v1 | secret | not required | secret |
Service | v1 | service | not required | service |
Stack | NA | NA | NA | stack |
Workflow | v1 | workflow | not required | workflow |