Service config
This is schema for service config which is sent to the unit during service installation.
Schema view for service config.
Loading ....
Source of the schema
aos-service-config.schema.json
{
"$defs": {
"AlertRulePercents": {
"description": "Schema alert triggering procedure in percents.",
"properties": {
"minTimeout": {
"anyOf": [
{
"format": "duration",
"type": "string"
},
{
"type": "null"
}
],
"description": "The duration in ISO8601 for a time window to check alert rule.",
"examples": [
"PT10S",
"PT1M"
],
"title": "Mintimeout"
},
"minThreshold": {
"anyOf": [
{
"maximum": 100,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"description": "The minimum threshold to stop alert.",
"title": "Minthreshold"
},
"maxThreshold": {
"anyOf": [
{
"maximum": 100,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"description": "The maximum threshold value to start alert.",
"title": "Maxthreshold"
}
},
"required": [
"minTimeout",
"minThreshold",
"maxThreshold"
],
"title": "AlertRulePercents",
"type": "object"
},
"AlertRulePoints": {
"description": "Schema alert triggering procedure.",
"properties": {
"minTimeout": {
"anyOf": [
{
"format": "duration",
"type": "string"
},
{
"type": "null"
}
],
"description": "The duration in ISO8601 for a time window to check alert rule.",
"examples": [
"PT10S",
"PT1M"
],
"title": "Mintimeout"
},
"minThreshold": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "The minimum threshold to stop alert.",
"title": "Minthreshold"
},
"maxThreshold": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "The maximum threshold value to start alert.",
"title": "Maxthreshold"
}
},
"required": [
"minTimeout",
"minThreshold",
"maxThreshold"
],
"title": "AlertRulePoints",
"type": "object"
},
"AlertRules": {
"description": "Schema for all possible alert rules.",
"properties": {
"ram": {
"anyOf": [
{
"$ref": "#/$defs/AlertRulePercents"
},
{
"type": "null"
}
],
"default": null,
"description": "RAM alert settings."
},
"cpu": {
"anyOf": [
{
"$ref": "#/$defs/AlertRulePercents"
},
{
"type": "null"
}
],
"default": null,
"description": "CPU alert settings."
},
"storage": {
"anyOf": [
{
"$ref": "#/$defs/AlertRulePercents"
},
{
"type": "null"
}
],
"default": null,
"description": "Storage alert settings."
},
"upload": {
"anyOf": [
{
"$ref": "#/$defs/AlertRulePoints"
},
{
"type": "null"
}
],
"default": null,
"description": "Upload alert settings."
},
"download": {
"anyOf": [
{
"$ref": "#/$defs/AlertRulePoints"
},
{
"type": "null"
}
],
"default": null,
"description": "Download alert settings."
}
},
"title": "AlertRules",
"type": "object"
},
"ResourceRatios": {
"description": "Schema for resource ratios.\n\nEach of specified resource ratio is treated as `requested` value.",
"properties": {
"cpu": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "CPU requested ratio in percents (against cpuLimit)",
"title": "Cpu"
},
"ram": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "RAM requested ratio in percents (against ramLimit)",
"title": "Ram"
},
"storage": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Storage requested ratio in percents (against storageLimit)",
"title": "Storage"
}
},
"title": "ResourceRatios",
"type": "object"
},
"RunParameters": {
"description": "Schema for startup parameters.",
"properties": {
"startInterval": {
"anyOf": [
{
"format": "duration",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The duration in ISO8601 format to wait service start.",
"examples": [
"PT10S",
"PT1M"
],
"title": "Startinterval"
},
"startBurst": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Service which are started more than burst times within an interval time span are not permitted to start any more.\nUse `startInterval` to configure the checking interval and `startBurst`\nto configure how many starts per interval are allowed.",
"examples": [
3,
10
],
"title": "Startburst"
},
"restartInterval": {
"anyOf": [
{
"format": "duration",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The duration in ISO8601 format to wait before service restart.",
"examples": [
"PT1S",
"PT1M"
],
"title": "Restartinterval"
}
},
"title": "RunParameters",
"type": "object"
},
"ServiceQuotas": {
"description": "Schema for possible quotas for a service.",
"properties": {
"cpuLimit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "CPU limit in DMIPs",
"title": "Cpulimit"
},
"ramLimit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "RAM limit in bytes",
"title": "Ramlimit"
},
"storageLimit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Storage limit in bytes",
"title": "Storagelimit"
},
"stateLimit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "State limit in bytes",
"title": "Statelimit"
},
"tmpLimit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Temporary storage limit in bytes",
"title": "Tmplimit"
},
"uploadSpeed": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Upload limit in bytes per second",
"title": "Uploadspeed"
},
"downloadSpeed": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Upload limit in bytes per second",
"title": "Downloadspeed"
},
"noFileLimit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Limit of opened files",
"title": "Nofilelimit"
},
"pidsLimit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Limit of PIDs",
"title": "Pidslimit"
}
},
"title": "ServiceQuotas",
"type": "object"
},
"UnitDevice": {
"description": "Schema for the `device` info structure.",
"properties": {
"name": {
"description": "The name of the systems device.",
"examples": [
"camera0",
"mic0"
],
"title": "Name",
"type": "string"
},
"permissions": {
"description": "The needed access permissions for the device.",
"examples": [
"r",
"rw",
"w"
],
"title": "Permissions",
"type": "string"
}
},
"required": [
"name",
"permissions"
],
"title": "UnitDevice",
"type": "object"
}
},
"description": "Aos service config schema.\n\nThis schema describes the specification of the `aosService` layer in a service.",
"properties": {
"created": {
"description": "Timestamp when Aos service was created.",
"format": "date-time",
"title": "Created",
"type": "string"
},
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Aos service author.",
"title": "Author"
},
"balancingPolicy": {
"default": "enabled",
"description": "Balancing type. `disabled` means total prohibition from balancing to other nodes.`",
"enum": [
"enabled",
"disabled"
],
"title": "Balancingpolicy",
"type": "string"
},
"hostname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The hostname of the Aos service. The FQDN is {hostname].{service_provider}.",
"title": "Hostname"
},
"runners": {
"anyOf": [
{
"items": {
"enum": [
"runc",
"crun",
"xrun"
],
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Aos service allowed runner types. Absense means [\"runc\", \"crun\"].",
"title": "Runners"
},
"runParameters": {
"anyOf": [
{
"$ref": "#/$defs/RunParameters"
},
{
"type": "null"
}
],
"default": null,
"description": "Run parameters for the Aos service."
},
"offlineTTL": {
"anyOf": [
{
"format": "duration",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "TTL (allowed time) to run service when unit in offline mode.\nIf value is absent service will live on an unit forever.\nFormat: ISO8601 duration.",
"examples": [
"PT1M",
"PT7D"
],
"title": "Offlinettl"
},
"devices": {
"anyOf": [
{
"$ref": "#/$defs/UnitDevice"
},
{
"type": "null"
}
],
"default": null,
"description": "List of needed or requested devices."
},
"resources": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of needed resources.",
"examples": [
"bluetooth",
"system-dbus"
],
"title": "Resources"
},
"allowedConnections": {
"anyOf": [
{
"items": {
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of allowed network connections.\nFormat of connection string: {service_uid}/[port|port_range]/[tcp|udp]",
"examples": [
"9931560c-be75-4f60-9abf-08297d905332/8087:8088/tcp",
"9931560c-be75-4f60-9abf-08297d905332/1515/udp"
],
"title": "Allowedconnections"
},
"quotas": {
"anyOf": [
{
"$ref": "#/$defs/ServiceQuotas"
},
{
"type": "null"
}
],
"default": null,
"description": "Quotas for the service."
},
"resourceRatios": {
"anyOf": [
{
"$ref": "#/$defs/ResourceRatios"
},
{
"type": "null"
}
],
"default": null,
"description": "Resource ratios for the service."
},
"alertRules": {
"anyOf": [
{
"$ref": "#/$defs/AlertRules"
},
{
"type": "null"
}
],
"default": null,
"description": "Alert rules for the service."
},
"permissions": {
"anyOf": [
{
"additionalProperties": {
"additionalProperties": {
"enum": [
"r",
"rw",
"w"
],
"type": "string"
},
"type": "object"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Service permissions to access resources.",
"examples": [
{
"vis": {
"Attributes.Vehicle.Vin": "r",
"Signal.Doors.*": "rw"
}
}
],
"title": "Permissions"
},
"sysctl": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Kernel parameters to be modified at runtime for the container.",
"examples": [
{
"net.core.somaxconn": "256",
"net.ipv4.ip_forward": "1"
}
],
"title": "Sysctl"
}
},
"required": [
"created"
],
"title": "AosConfigSchema",
"type": "object"
}