Application Description
The purpose of the Application Description is to enable an application's discovery, configuration, and deployment on edge devices.
To deploy an application the end user specifies values for the parameters given in
an Application Description (e.g., through a UI of the WFM) to instantiate an ApplicationDeployment,
which defines the desired state for an application.
Top-level Attributes
| Attribute | Type | Required? | Description |
|---|---|---|---|
| apiVersion | string | Y | Identifier of the version of the API the object definition follows. Must be "v1". |
| id | string | Y | An identifier for the application. The id is used to help create unique identifiers where required, such as namespaces. The id must be lower case letters and numbers and MAY contain dashes. Uppercase letters, underscores and periods MUST NOT be used. The id MUST NOT be more than 200 characters. |
| metadata | Metadata | Y | Metadata element specifying characteristics about the application deployment. See the Metadata Attributes section below. |
| deploymentProfiles | []DeploymentProfile | Y | Deployment profiles element specifying the types of deployments the application supports. See the Deployment section below. |
| parameters | map[string][Parameter] | N | Parameters element specifying the configurable parameters to use when installing, or updating, the application. Defined as a map where each key is the user-defined parameter name (e.g. mysqlDatabase:, greeting:, idpName:, myAppEndpoint:), and value would be Parameter object, i.e. map[string]Parameter. See the Parameter section below. |
| configuration | Configuration | N | Configuration element specifying how parameters should be displayed to the user for setting the value as well as the rules to use to validate the user's input. See the Configuration section below. |
| x-<unique-name>-extensions | map[string]interface{} | N | Allows addition of arbitrary object (mapping) whose contents suppliers use to provide vendor-specific functionality beyond what is defined in the Margo specification. See the Specification Extensions section below for more details. |
Metadata Attributes
Metadata about the application.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| name | string | Y | The application's official name. This name is for display purposes only and can container whitespace and special characters. |
| description | string | N | None |
| version | string | Y | The application's version. |
| catalog | Catalog | Y | Catalog element specifying the application's metadata for enabling its discovery. See the Catalog section below. |
Catalog Attributes
Catalog metadata for displaying the application.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| application | ApplicationMetadata | N | Application element specifying the application specific metadata. See the Application Metadata section below. |
| author | []Author | N | Author element specifying metadata about the application's author. See the Author Metadata section below. |
| organization | []Organization | Y | Organization element specifying metadata about the organization/company providing the application. See the Organization Metadata section below. |
ApplicationMetadata Attributes
Metadata specific to the application.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| descriptionFile | string | N | Link to the file containing the application's full description. The file should be a markdown file. |
| icon | string | N | Link to the icon file (e.g., in PNG format). |
| licenseFile | string | N | Link to the file that details the application's license. The file should either be a plain text, markdown or PDF file. |
| releaseNotes | string | N | Statement about the changes for this application's release. The file should either be a markdown or PDF file. |
| site | string | N | Link to the application's website. |
| tagline | string | N | The application's slogan. |
| tags | []string | N | An array of strings that can be used to provide additional context for the application in a user interface to assist with task such as categorizing, searching, etc. |
Author Attributes
Information about the application's author.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| name | string | N | The name of the application's creator. |
| string | N | Email address of the application's creator. |
Organization Attributes
Information about the providing organization.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| name | string | Y | Organization responsible for the application's development and distribution. |
| site | string | N | Link to the organization's website. |
DeploymentProfile Attributes
Represents a deployment configuration for the application.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| type | string | Y | Defines the type of this deployment configuration for the application. The allowed values are helm, to indicate the deployment profile's format is Helm version 3 or Version 4 using Chart APIVersion v2 (see special exceptions below), compose to indicate the deployment profile's format is a Compose file, and custom to indicate the deployment profile's format is custom and not defined in the Margo specification. When installing the application on a device supporting the Kubernetes platform, all helm components, and only helm components, will be provided to the device in same order they are listed in the application description file. When installing the application on a device supporting Compose, all compose components, and only compose components, will be provided to the device in the same order they are listed in the application description file. The device will install the components in the same order they are listed in the application description file. When installing the application on a device supporting a matched custom deployment format, all custom components, and only custom components, will be provided to the device in the same order they are listed in the application description file. Since custom deployment types are beyond the scope of the Margo specification, application and device suppliers should collaborate to understand how the application will be deployed. See the custom runtimes and deployments section below for more details. |
| id | string | Y | An identifier for the deployment profile, given by the application developer, used to uniquely identify this deployment profile from others within this application description's scope. |
| components | []Component | Y | Component element indicating the components to deploy when installing the application. See the Component section below. |
| description | string | N | This human-readable description of a deployment profile allows for providing additional context about the deployment profile. E.g., the application developer can use this to describe the deployment profile's purpose, such as the intended use case. Additionally, the application developer can use this to provide further details about the resources, peripherals, and interfaces required to run the application. |
| deviceConstraints | DeviceConstraints | N | Device constraints specifying the minimum device capabilities and eligibility rules required for the application. See the Device Constraints section below. |
| x-<unique-name>-extensions | map[string]interface{} | N | Allows addition of arbitrary object (mapping) whose contents suppliers use to provide vendor-specific functionality beyond what is defined in the Margo specification. See the Specification Extensions section below for more details. |
Helm Exceptions
Applications can be deployed as Helm charts using either Helm version 3 or version 4 using Chart APIVersion v2 only.
In order to facilitate the required deployment options for Helm charts, Margo does not support Helm functions requiring direct communication with the Kubernetes API.
Your Helm based application MUST NOT rely on the following Helm functions:
- Lookup: The
lookuptemplate function queries live resources in the target Kubernetes cluster at render time, for example to fetch ConfigMaps, Secrets, or other objects. This requires direct API access and cluster credentials during rendering. - Hooks: Hooks (pre/post install, upgrade, delete, rollback, test, etc.) execute additional Kubernetes resources or jobs at specific points in the release lifecycle. Helm waits for these resources to reach a ready state by monitoring them via the Kubernetes API, and the hooks themselves may perform privileged or arbitrary operations in the cluster.
- CRD management via Helm: Installing or managing Custom Resource Definitions (CRDs) with Helm requires checking for the presence of CRDs and registering new APIs with the cluster, which involves API calls and may require elevated permissions.
Note: This function list is based on the current Helm v3 and v4 implementations. Additional functions may be added later if Helm introduces new functions requiring communication with the Kubernetes API to work.
DeviceConstraints Attributes
Device constraints specifying the minimum device capabilities and eligibility rules required for the application.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| capacityRequirements | CapacityRequirements | N | Minimum CPU, memory, and storage requirements for the deployment profile. See the Capacity Requirements section below. |
| eligibilityRules | []EligibilityRule | N | Optional rules used to match the application with device properties and supplier-defined labels reported in the device capabilities. See the Eligibility Rules section below. |
Workload fleet manager implementations are not required to guarantee a workload can be deployed to a selected device. Ultimately, this responsibility falls to the device to determine if a workload can be deployed or not.
Workload fleet manager implementations MAY choose to implement device eligibility matching in order to reduce the risk of deployment failures because of incompatibility between what a workload requires and what a device provides.
If a workload fleet manager chooses to implement device eligibility matching they MUST follow the matching rules define below to match the application description's device constraint requirements with device's reported capabilities.
- A workload fleet manager MUST evaluate
deviceConstraintsbefore selecting a target device for a deployment profile. - A device that does not satisfy the minimum required CPU, memory, and storage defined in the
capacityRequirementsMUST NOT be selected for that profile. - If
eligibilityRulesare present, a device that does not satisfy the required rule evaluation MUST NOT be selected for that profile. - If no available device satisfies the profile's required constraints, the deployment MUST be reported as not placeable according to the implementation's existing status model.
If a workload fleet manager chooses to implement device eligibility matching they MAY choose to find only the first suitable device or all suitable devices.
CapacityRequirements Attributes
Minimum device capacity required by the deployment profile.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| cpu | CPU | N | CPU element specifying the CPU requirements for the application. See the CPU section below. |
| memory | string | N | The minimum amount of memory required. The value is given in binary units (Ki = Kibibytes, Mi = Mebibytes, Gi = Gibibytes). This is defined by the application developer. After deployment of the application, the device MUST provide this amount of memory for the application. |
| storage | string | N | The amount of storage required for the application to run. This encompasses the installed application and the data it needs to store. The value is given in binary units (Ki = Kibibytes, Mi = Mebibytes, Gi = Gibibytes, Ti Tebibytes, Pi = Pebibytes, Ei = Exbibytes). This is defined by the application developer. After deployment of the application, the device MUST provide this amount of storage for the application |
The following rules MUST be applied when performing capacity requirements matching:
cpu.coresis the minimum number of CPU cores required on the target device.cpu.architectures, when present, restricts acceptable CPU architectures.memoryis the minimum memory required by the deployment profile.storageis the minimum storage required by the deployment profile.- A device MUST satisfy all specified
capacityRequirementsto remain eligible for further evaluation.
The capacity requirements device constraint is intended to make it easier for application suppliers to indicate the most common workload constraints. Application suppliers MAY use either the capacityRequirements or a propertySelector eligibility rule to describe their capacity constraints. Application suppliers SHOULD avoid using both simultaneously. If both are used, validation logic MUST treat them as independent rule definitions and not try to correlate what is defined in the capacityRequirements with what is defined in the properSelector.
CPU Attributes
CPU element specifying the CPU requirements for the application.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| cores | double | Y | The required amount of CPU cores the application must use to run in its full functionality. Specified as decimal units of CPU cores (e.g., 0.5 is half a core). This is defined by the application developer. After deployment of the application, the device MUST provide this number of CPU cores for the application. |
| architectures | []CpuArchitectureType | N | The CPU architectures supported by the application. This can be e.g. amd64, arm64, arm. See the CpuArchitectureType definition for all permissible values. Multiple architecture types can be specified, as the deployment profile may support multiple CPU architectures. |
EligibilityRule Attributes
A rule matching properties and supplier-defined labels reported through the device capabilities.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| propertySelector | Selector | N | Selector evaluated against the properties reported in the device capabilities properties object. |
| labelSelector | Selector | N | Selector evaluated against the labels reported in the device capabilities labels dictionary. |
Eligibility rules
The following rules MUST be applied when performing eligibility rule matching:
eligible devices =
OR over each rule in eligibilityRules:
AND(
propertySelector matches (TRUE if propertySelector is omitted),
labelSelector matches (TRUE if labelSelector is omitted)
)- Each eligibility rule is evaluated using a logical OR.
- A least one eligibility rule MUST evaluate to true to be considered a match.
- If
eligibilityRulesis omitted, the deployment profile has no additional selector-based constraint beyondcapacityRequirements, if present.
- The
propertySelectorandlabelSelectorexpressions are combined using a logical AND.- An eligibility rule MAY contain a
propertySelector,labelSelectoror both. - All property selector and all label selectors expressions MUST evaluate to true to be considered a match.
- An eligibility rule MAY contain a
- All
matchExpressionswithin a single property or label selector are combined using logical AND.- All match expressions MUST evaluate to true to be considered a match.
| You want... | Do this |
|---|---|
| Condition A AND condition B must both be true within the same selector type | One matchExpressions list with both expressions in the same propertySelector or labelSelector |
| Condition A AND condition B must both be true but one condition is a property and the other a label | One eligibilityRules entry with both propertySelector and labelSelector set |
| Condition A OR condition B must be true | Two separate eligibilityRules entries |
Property selector key format
propertySelector.matchExpressions[].key MUST be a JSON Pointer as defined by RFC 6901, evaluated relative to the device capabilities properties object.
Examples:
/vendor/id/modelNumber
Property selectors MUST resolve to a device capability property whose value is either:
- a string, number, or boolean
- an array of strings, or numbers
- an array of objects
If a property selector resolves to any other JSON type, the expression MUST evaluate to false.
If a property selector resolves to an array of objects, ContainsAll or ContainsAny must be used, or else the expression MUST evaluate to false.
Label selector key format
labelSelector.matchExpressions[].key MUST be the exact label key to evaluate within the device capabilities labels dictionary.
This label selector MUST resolve to a device capability label whose value is either:
- a string, number, or boolean
- an array of strings, or numbers
If a label selector resolves to any other JSON type, the expression MUST evaluate to false.
Selector Attributes
A set of match expressions evaluated with AND semantics.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| matchExpressions | []MatchExpression | Y | Match expressions evaluated against the device's reported capabilities. |
MatchExpression Attributes
An expression used to match a device's reported capabilities properties or labels.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| key | string | Y | The key used to match the device's reported capabilities. For property selectors, this MUST be a JSON Pointer, as defined by RFC 6901, mapping to a specific property. For label selectors, this MUST be the exact label key. |
| operator | SelectorOperator | Y | Operator used to evaluate the referenced value. See SelectorOperator for all permissible values. |
| values | []Any | N | Values used by the operator when required for matching expressions. Required for the In, NotIn, Gt, or Lt operator. |
| itemSelector | Selector | N | Selector evaluated against array elements. Required for the ContainsAll or ContainsAny operator. |
The following rules MUST be followed when evaluating match expressions:
| Operator | Evaluation Rule |
|---|---|
In | True when the referenced device capabilities value equals one of values, or when the referenced array contains at least one element that equals one of values |
NotIn | True when the referenced device capabilities key exists and none of its values match any entry in values |
Exists | True when the referenced device capabilities key is present |
DoesNotExist | True when the referenced device capabilities key is absent |
Gt | True when the referenced device capabilities value is greater than values |
Lt | True when the referenced device capabilities value is less than values |
ContainsAll | True when the referenced device capabilities value is an array of objects, and at least one array element satisfies all itemSelector.matchExpressions (AND logic) |
ContainsAny | True when the referenced device capabilities value is an array of objects, and at least one array element satisfies any itemSelector.matchExpression (OR logic) |
String comparisons MUST be exact and case-sensitive.
For the In and NotIn operator:
valuesMUST be presentvaluesMUST contain one or more strings or numbers, or one booleanvaluesMUST be the same data type when indicating more than one.
For the Exists and DoesNotExist operator:
valuesMUST be omitted
For the Gt and Lt operator:
valuesMUST be presentvaluesMUST be parsable as numbersvaluesMUST only contain a single number
For the ContainsAll and ContainsAny operator:
itemSelectorMUST be presentitemSelector.matchExpressionsMUST contain one or more expressionsvaluesMUST be omitted- Keys within
itemSelector.matchExpressionsare JSON Pointers relative to each array element (not absolute) - Expressions within
itemSelector.matchExpressionsare combined usingANDlogic forContainsAllandORlogic forContainsAny
Object Array Item Matching
ContainsAll and ContainsAny operators enable matching on properties of objects within an array. These operators are used when the device capability property referenced by key resolves to an array of objects.
ContainsAll (array element with all conditions):
Evaluates to true when at least one array element satisfies all conditions specified in itemSelector.matchExpressions. All expressions within the itemSelector are combined using AND logic.
Example: Match a device that has at least one GPU peripheral manufactured by NVIDIA:
propertySelector:
matchExpressions:
- key: /peripherals
operator: ContainsAll
itemSelector:
matchExpressions:
- key: /type
operator: In
values: ["gpu"]
- key: /manufacturer
operator: In
values: ["NVIDIA"]ContainsAny (array element with any condition):
Evaluates to true when at least one array element satisfies any condition specified in itemSelector.matchExpressions. Expressions within the itemSelector are combined using OR logic.
Example: Match a device that has at least one peripheral that is either a GPU or a high-speed NIC:
propertySelector:
matchExpressions:
- key: /peripherals
operator: ContainsAny
itemSelector:
matchExpressions:
- key: /type
operator: In
values: ["gpu", "nic"]Interaction with other expressions:
Multiple matchExpressions within the same propertySelector remain AND'd together. For example:
propertySelector:
matchExpressions:
- key: /vendor
operator: In
values: ["Vendor Name"]
- key: /peripherals
operator: ContainsAll
itemSelector:
matchExpressions:
- key: /type
operator: In
values: ["gpu"]This evaluates to true only when the device vendor matches AND the device has at least one GPU peripheral.
Component Attributes
A class representing a component of a deployment profile.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| name | string | Y | A unique name used to identify the component package. For helm installations the name will be used as the chart name. The name must be lower case letters and numbers and MAY contain dashes. Uppercase letters, underscores and periods MUST NOT be used. |
| properties | ComponentProperties | Y | A dictionary element specifying the component packages's deployment details. See the Component Properties section below. |
| x-<unique-name>-extensions | map[string]interface{} | N | Allows addition of arbitrary object (mapping) whose contents suppliers use to provide vendor-specific functionality beyond what is defined in the Margo specification. See the Specification Extensions section below for more details. |
ComponentProperties Attributes
The expected properties for all OCI-based deployment types (Helm and Compose) are indicated below.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| repository | string | Y | OCI repository URI for the component package (e.g., oci://registry.example.com/org/component-name). MUST be a valid OCI reference using the oci:// scheme. See Compose Component Registry for details. |
| revision | string | Y | OCI tag identifying the component version. MUST be a valid SemVer 2.0 string without a leading v. Build metadata separator + MUST be stored as _ because + is not a valid OCI tag character. |
| wait | bool | N | If True, indicates the device MUST wait until the component installation completes before installing the next component. For Helm: waits until the release is deployed. For Compose: waits until all containers reach running state. The default is True. The Workload Fleet Management Client MUST support True and MAY support False. Only applies if multiple components are provided. |
| timeout | string | N | The time to wait for the component's installation to complete. If the installation does not complete before the timeout occurs the installation process fails. The format is "##m##s" indicating the total number of minutes and seconds to wait. |
Defining configurable application parameters
To allow customizable configuration values when installing an application, the application description defines the parameters and configuration sections giving the application vendor control over what can be configured when installing, or updating, an application. The configuration section describes how the workload orchestration software vendor must display parameters to the user to allow them to specify the values. The schema section describes how the workload orchestration software vendor must validate the values provided by the user before the application is installed or updated.
Note: At this point the specification only deals with parameter values provided by the user as part of installing, or updating, the application. We anticipate parameter values to come from other sources, such as the device, in the future and not only from the user.
Parameter Attributes
Defines a configurable parameter for the application. This object is used to build a property bag, i.e. parameters, defined in application description. See parameters attribute under ApplicationDescription Attributes section for better understanding.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| value | <see description> | N | The parameter's default value. Accepted data types are string, integer, double, boolean, array[string], array[integer], array[double], array[boolean]. |
| targets | []Target | Y | Used to indicate which component the value should be applied to when installing, or updating, the application. See the Target section below. |
Target Attributes
Specifies where the parameter applies in the deployment.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| pointer | string | Y | The name of the parameter in the deployment configuration. For Helm deployments, this is the dot notation for the matching element in the values.yaml file. This follows the same naming convention you would use with the --set command line argument with the helm install command. For compose deployments, this is the name of the environment variable to set. |
| components | []string | Y | Indicates which deployment profile [component](#component-attributes the parameter target applies to. The component name specified here MUST match a component name in the deployment profiles section. |
Configuration Attributes
Configuration layout and validation rules.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| sections | []Section | Y | Sections are used to group related parameters together, so it is possible to present a user interface with a logical grouping of the parameters in each section. See the Section section below. |
| schema | []Schema | Y | Schema is used to provide details about how to validate each parameter value. At a minimum, the parameter value must be validated to match the schema's data type. The schema indicates additional rules the provided value must satisfy to be considered valid input. See the Schema section below. |
Section Attributes
Named sections within the configuration layout.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| name | string | Y | The name of the section. This may be used in the user interface to show the grouping of the associated parameters within the section. |
| settings | []Setting | Y | Settings are used to provide instructions to the workload orchestration software vendor for displaying parameters to the user. A user MUST be able to provide values for all settings. See the Setting section below. |
Setting Attributes
Individual configuration settings.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| parameter | string | Y | The name of the parameter the setting is associated with. |
| name | string | Y | The parameter's display name to show in the user interface. |
| description | string | N | The parameters's short description to provide additional context to the user in the user interface about what the parameter is for. |
| immutable | boolean | N | If true, indicates the parameter value MUST not be changed once it has been set and used to install the application. Default is false if not provided. |
| schema | string | Y | The name of the schema definition to use to validate the parameter's value. See the Schema section below. |
Schema Attributes
Defines data type and rules for validating user provided parameter values. Subclasses (see below) define for each data type their own set of validation rules that can be used. The value MUST be validated against all rules defined in the schema.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| name | string | Y | The name of the schema rule. This used in the setting to link the setting to the schema rule. |
| dataType | string | Y | Indicates the expected data type for the user provided value. Accepted values are string, integer, double, boolean, array[string], array[integer], array[double], array[boolean]. At a minimum, the provided parameter value MUST match the schema's data type if no other validation rules are provided. |
(Subclass of Schema)
Extends schema to define a string/text-specific set of validation rules that can be used.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| allowEmpty | boolean | N | If true, an empty value is permitted. Default is false if not provided. |
| minLength | integer | N | If set, indicates the minimum number of characters the value must have to be considered valid. |
| maxLength | integer | N | If set, indicates the maximum number of characters the value must have to be considered valid. |
| regexMatch | string | N | If set, indicates a regular expression to use to validate the value. |
(Subclass of Schema)
Extends schema to define a boolean-specific set of validation rules that can be used.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| allowEmpty | boolean | N | If true, an empty value is permitted. Default is false if not provided. |
(Subclass of Schema)
Extends schema to define a integer-specific set of validation rules that can be used.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| allowEmpty | boolean | N | If true, an empty value is permitted. Default is false if not provided. |
| minValue | integer | N | If set, indicates the minimum allowed integer value the value must have to be considered valid. |
| maxValue | integer | N | If set, indicates the maximum allowed integer value the value must have to be considered valid. |
(Subclass of Schema)
Extends schema to define a double-specific set of validation rules that can be used.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| allowEmpty | boolean | N | If true, an empty value is permitted. Default is false if not provided. |
| minValue | float | N | If set, indicates the minimum value to be considered valid. |
| maxValue | float | N | If set, indicates the maximum value to be considered valid. |
| minPrecision | integer | N | If set, indicates the minimum level of precision the value must have to be considered valid. |
| maxPrecision | integer | N | If set, indicates the maximum level of precision the value must have to be considered valid. |
(Subclass of Schema)
Extends schema to define a specific set of validation rules that can be used for select options.
| Attribute | Type | Required? | Description |
|---|---|---|---|
| allowEmpty | boolean | N | If true, an empty value is permitted. Default is false if not provided. |
| multiselect | boolean | N | If true, indicates multiple values can be selected. If multiple values can be selected the resulting value is an array of the selected values. The default is false if not provided. |
| options | []string | Y | This provides the list of acceptable options the user can select from. The data type for each option must match the parameter setting’s data type. |
Enumerations
These enumerations are used as vocabularies for attribute values of the ApplicationDescription.
CpuArchitectureType
| Permissible Values | Description |
|---|---|
| amd64 | AMD 64-bit architecture. |
| arm64 | ARM 64-bit architecture. |
| arm | ARM 32-bit architecture. |
SelectorOperator
| Permissible Values | Description |
|---|---|
| In | Indicates matching should find a match with at least one specified value. |
| NotIn | Indicates matching should not find a match with any specified values. |
| Exists | Indicates matching should find a match on the specified key. |
| DoesNotExist | Indicates matching should not find a match on the specified key. |
| Gt | Indicates matching should find a match if the target value is greater than the specified value. |
| Lt | Indicates matching should find a match if the target value is less than the specified value. |
| ContainsAll | Indicates matching should find a match against all itemSelectors. |
| ContainersAny | Indicates matching should find a match against at least one itemSelector. |
Application Description Examples
Example 1: Simple Application Description
A simple hello-world example of an ApplicationDescription is shown below:
apiVersion: v1
id: com-northstartida-hello-world
metadata:
name: Hello World
description: A basic hello world application
version: "1.0"
catalog:
application:
icon: ./resources/hw-logo.png
tagline: Northstar Industrial Application's hello world application.
descriptionFile: ./resources/description.md
releaseNotes: ./resources/release-notes.md
licenseFile: ./resources/license.pdf
site: http://www.northstar-ida.com
tags: ["monitoring"]
author:
- name: Roger Wilkershank
email: rpwilkershank@northstar-ida.com
organization:
- name: Northstar Industrial Applications
site: http://northstar-ida.com
deploymentProfiles:
- type: helm
id: com-northstartida-hello-world-helm-a
components:
- name: hello-world
properties:
repository: oci://northstarida.azurecr.io/charts/hello-world
revision: 1.0.1
wait: true
parameters:
greeting:
value: Hello
targets:
# Maps to deployment configuration param,
# e.g., helm install ... --set global.config.appGreeting="Hello"
- pointer: global.config.appGreeting
components: ["hello-world"]
greetingAddressee:
value: World
targets:
- pointer: global.config.appGreetingAddressee
components: ["hello-world"]
configuration:
sections:
- name: General Settings
settings:
- parameter: greeting
name: Greeting
description: The greeting to use.
schema: requireText
- parameter: greetingAddressee
name: Greeting Addressee
description: The person, or group, the greeting addresses.
schema: requireText
schema:
- name: requireText
dataType: string
maxLength: 45
allowEmpty: falseExample 2: Application Description with Deployment Profiles for Helm and Compose
An example of an ApplicationDescription defining deployment profiles for both cases, Helm chart as well as Compose, is shown below.
apiVersion: v1
id: com-northstartida-digitron-orchestrator
metadata:
name: Digitron orchestrator
description: The Digitron orchestrator application
version: 1.2.1
catalog:
application:
icon: ./resources/ndo-logo.png
tagline: Northstar Industrial Application's next-gen, AI driven, Digitron instrument orchestrator.
descriptionFile: ./resources/description.md
releaseNotes: ./resources/release-notes.md
licenseFile: ./resources/license.pdf
site: http://www.northstar-ida.com
tags: ["optimization", "instrumentation"]
author:
- name: Roger Wilkershank
email: rpwilkershank@northstar-ida.com
organization:
- name: Northstar Industrial Applications
site: http://northstar-ida.com
deploymentProfiles:
- type: helm
id: com-northstartida-digitron-orchestrator-helm-a
description: This allows to install / run the application as a Helm chart deployment.
The device where this application is installed needs to have a screen and a keyboard (as indicated in the required peripherals).
components:
- name: database-services
properties:
repository: oci://quay.io/charts/realtime-database-services
revision: 2.3.7
wait: true
timeout: 8m30s
- name: digitron-orchestrator
properties:
repository: oci://northstarida.azurecr.io/charts/northstarida-digitron-orchestrator
revision: 1.0.9
wait: true
deviceConstraints:
capacityRequirements:
cpu:
cores: 1.5
architectures:
- amd64
memory: 1024Mi
storage: 10Gi
eligibilityRules:
- propertySelector:
matchExpressions:
- key: /peripherals
operator: ContainsAll
itemSelector:
matchExpressions:
- key: /type
operator: In
values: ["gpu"]
- key: /manufacturer
operator: In
values: ["NVIDIA"]
- key: /interfaces
operator: ContainsAll
itemSelector:
matchExpressions:
- key: /type
operator: In
values: ["ethernet", "bluetooth"]
- type: compose
id: com-northstartida-digitron-orchestrator-compose-a
components:
- name: digitron-orchestrator-docker
properties:
repository: oci://northstarida.azurecr.io/compose/digitron-orchestrator
revision: 1.0.9
parameters:
idpName:
value: "test"
targets:
# Maps to deployment configuration param,
# e.g., helm install ... --set idp.name="test"
- pointer: idp.name
components: ["digitron-orchestrator"]
# Maps to environment variables, e.g., IDP_NAME=test docker compose ...
- pointer: IDP_NAME
components: ["digitron-orchestrator-docker"]
idpProvider:
targets:
- pointer: idp.provider
components: ["digitron-orchestrator"]
- pointer: IDP_PROVIDER
components: ["digitron-orchestrator-docker"]
idpClientId:
targets:
- pointer: idp.clientId
components: ["digitron-orchestrator"]
- pointer: IDP_CLIENT_ID
components: ["digitron-orchestrator-docker"]
idpUrl:
targets:
- pointer: idp.providerUrl
components: ["digitron-orchestrator"]
- pointer: idp.providerMetadata
components: ["digitron-orchestrator"]
- pointer: IDP_URL
components: ["digitron-orchestrator-docker"]
adminName:
targets:
- pointer: administrator.name
components: ["digitron-orchestrator"]
- pointer: ADMIN_NAME
components: ["digitron-orchestrator-docker"]
adminPrincipalName:
targets:
- pointer: administrator.userPrincipalName
components: ["digitron-orchestrator"]
- pointer: ADMIN_PRINCIPALNAME
components: ["digitron-orchestrator-docker"]
pollFrequency:
value: 30
targets:
- pointer: settings.pollFrequency
components: ["digitron-orchestrator", "database-services"]
- pointer: POLL_FREQUENCY
components: ["digitron-orchestrator-docker"]
siteId:
targets:
- pointer: settings.siteId
components: ["digitron-orchestrator", "database-services"]
- pointer: SITE_ID
components: ["digitron-orchestrator-docker"]
cpuLimit:
value: 1
targets:
- pointer: settings.limits.cpu
components: ["digitron-orchestrator"]
memoryLimit:
value: 16384
targets:
- pointer: settings.limits.memory
components: ["digitron-orchestrator"]
configuration:
sections:
- name: General
settings:
- parameter: pollFrequency
name: Poll Frequency
description: How often the service polls for updated data in seconds
schema: pollRange
- parameter: siteId
name: Site Id
description: Special identifier for the site (optional)
schema: optionalText
- name: Identity Provider
settings:
- parameter: idpName
name: Name
description: The name of the Identity Provider to use
immutable: true
schema: requiredText
- parameter: idpProvider
name: Provider
description: Provider something something
immutable: true
schema: requiredText
- parameter: idpClientId
name: Client ID
description: The client id
immutable: true
schema: requiredText
- parameter: idpUrl
name: Provider URL
description: The url of the Identity Provider
immutable: true
schema: url
- name: Administrator
settings:
- parameter: adminName
name: Presentation Name
description: The presentation name of the administrator
schema: requiredText
- parameter: adminPrincipalName
name: Principal Name
description: The principal name of the administrator
schema: email
- name: Resource Limits
settings:
- parameter: cpuLimit
name: CPU Limit
description: Maximum number of CPU cores to allow the application to consume
schema: cpuRange
- parameter: memoryLimit
name: Memory Limit
description: Maximum number of memory to allow the application to consume
schema: memoryRange
schema:
- name: requiredText
dataType: string
maxLength: 45
allowEmpty: false
- name: email
dataType: string
allowEmpty: false
regexMatch: .*@[a-z0-9.-]*
- name: url
dataType: string
allowEmpty: false
regexMatch: ^(http(s):\/\/.)[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$
- name: pollRange
dataType: integer
minValue: 30
maxValue: 360
allowEmpty: false
- name: optionalText
dataType: string
minLength: 5
allowEmpty: true
- name: cpuRange
dataType: double
minValue: 0.5
maxPrecision: 1
allowEmpty: false
- name: memoryRange
dataType: integer
minValue: 16384
allowEmpty: falseCustom runtimes and deployments
Note: See the Custom Runtimes and Deployments page for additional details.
An application and device supplier MAY collaborate to enable deploying workloads using a format other than Margo's specified deployment types.
If suppliers choose this option, they MUST follow these rules:
- The deployment profile type MUST be set to
custom. - Device constraint eligibility rules MUST be defined with label selectors matching the supplier's agreed-upon key/value label pairs reported in the device's capabilities document.
- The workload artifacts MUST be packaged in an OCI blob. The specific details for how this OCI blob is created are the responsibility of the suppliers to agree upon.
Specification extensions
Note: See the specification extensions page for additional details.
The Application Description document supports the following specification extension scenarios:
Collaboration between application and workload fleet manager suppliers
To make use of specification extensions defined by a workload fleet manager supplier, the extension property MUST be added to the Application Description YAML document's root.
The workload fleet manager MUST ignore any unknown specification extensions targeting a workload fleet manager supplier. Importing an application description with unknown specification extensions MUST NOT result in a failure because of the included specification extensions.
The workload fleet manager MUST NOT propagate these specification extension properties to the device via the Application Deployment yaml document.
Collaboration between application and device suppliers
To make use of specification extensions defined by a device supplier, the extension property MUST be added to the root of either the deploymentProfile or component objects.
The workload fleet manager MUST import an application description with specification extensions targeting a device supplier without resulting in a failure because of the included specification extensions.
The workload fleet manager MUST propagate these extension properties to the device via the Application Deployment yaml document.