Sidecar
Sidecars are secondary utility containers running side by side with the main container in the same host. They are Docker images that can be instantiated from the dedicated section of the Console Design area.
To create or edit a sidecar, you need to provide a manifest, whose resources
property should adhere to the following JSON schema.
tip
The JSON schemas of the sidecar resources and of the full sidecar manifest are available on GitHub.
- Schema Viewer
- Raw JSON Schema
- Example
Loading ....
{
"$id": "catalog-sidecar-resources.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"description": "Resources of Catalog items of type sidecar",
"properties": {
"componentId": {
"type": "string"
},
"description": {
"type": "string"
},
"containerPorts": {
"items": {
"additionalProperties": false,
"properties": {
"from": {
"oneOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 65535
},
{
"pattern": "^$|^((\\{\\{([A-Z])([A-Z0-9_]*)\\}\\})|([1-9]\\d*|0))$",
"type": "string"
}
]
},
"name": {
"pattern": "^[a-z]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
},
"protocol": {
"default": "TCP",
"enum": [
"TCP",
"UDP"
],
"type": "string"
},
"to": {
"oneOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 65535
},
{
"pattern": "^$|^((\\{\\{([A-Z])([A-Z0-9_]*)\\}\\})|([1-9]\\d*|0))$",
"type": "string"
}
]
}
},
"required": [
"name",
"from"
],
"type": "object"
},
"type": "array"
},
"defaultArgs": {
"items": {
"type": "string"
},
"type": "array"
},
"defaultConfigMaps": {
"description": "The default ConfigMaps, if any, that will be mounted inside the container of the microservice",
"items": {
"additionalProperties": false,
"properties": {
"files": {
"items": {
"properties": {
"content": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name",
"content"
],
"type": "object"
},
"type": "array"
},
"link": {
"properties": {
"targetSection": {
"type": "string"
}
},
"type": "object"
},
"mountPath": {
"pattern": "^[a-zA-Z0-9-/_\\s.|\\\\!\"£$%&()=?^\"{}[\\]*+@]+$",
"type": "string"
},
"name": {
"pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$",
"type": "string"
},
"subPaths": {
"type": "array",
"items": {
"type": "string"
}
},
"usePreserve": {
"type": "boolean"
},
"viewAsReadOnly": {
"type": "boolean"
}
},
"required": [
"name",
"files",
"mountPath"
],
"type": "object"
},
"type": "array"
},
"defaultEnvironmentVariables": {
"description": "The environment variables that will overwrite the default environment variables applied by the Console",
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"name": {
"description": "The variable name (generally, a key written in UPPER_SNAKE_CASE)",
"minLength": 1,
"type": "string"
},
"description": {
"description": "A brief description of the variable",
"type": "string"
},
"managedBy": {
"description": "A string that represents the Console section that manages the variable. It only works used in combination with the `readOnly` property set to `true`",
"type": "string",
"enum": [
"fast-data"
]
},
"readOnly": {
"description": "A boolean that represents if you can change the value of the variable through the Console",
"type": "boolean"
},
"value": {
"description": "The variable default value. It can contain placeholders that will be replaced with the actual values when the service is created",
"type": "string"
},
"valueType": {
"const": "plain"
}
},
"required": [
"name",
"valueType"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"name": {
"description": "The variable name (generally, a key written in UPPER_SNAKE_CASE)",
"minLength": 1,
"type": "string"
},
"description": {
"description": "A brief description of the variable",
"type": "string"
},
"managedBy": {
"description": "A string that represents the Console section that manages the variable. It only works used in combination with the `readOnly` property set to `true`",
"type": "string",
"enum": [
"fast-data"
]
},
"readOnly": {
"description": "A boolean that represents if you can change the value of the variable through the Console",
"type": "boolean"
},
"configMapName": {
"pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$",
"type": "string"
},
"configMapFileName": {
"pattern": "^[-._a-zA-Z0-9]+$",
"type": "string"
},
"valueType": {
"const": "configmap"
}
},
"required": [
"name",
"valueType",
"secretName",
"secretKey"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"name": {
"description": "The variable name (generally, a key written in UPPER_SNAKE_CASE)",
"minLength": 1,
"type": "string"
},
"description": {
"description": "A brief description of the variable",
"type": "string"
},
"managedBy": {
"description": "A string that represents the Console section that manages the variable. It only works used in combination with the `readOnly` property set to `true`",
"type": "string",
"enum": [
"fast-data"
]
},
"readOnly": {
"description": "A boolean that represents if you can change the value of the variable through the Console",
"type": "boolean"
},
"secretKey": {
"pattern": "^((\\{\\{([A-Z])([A-Z0-9_]*)\\}\\})|[a-zA-Z0-9-_.]*)$",
"type": "string"
},
"secretName": {
"pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$",
"type": "string"
},
"valueType": {
"const": "secret"
}
},
"required": [
"name",
"valueType",
"secretName",
"secretKey"
],
"type": "object"
},
{
"oneOf": [
{
"additionalProperties": false,
"properties": {
"name": {
"description": "The variable name (generally, a key written in UPPER_SNAKE_CASE)",
"minLength": 1,
"type": "string"
},
"description": {
"description": "A brief description of the variable",
"type": "string"
},
"managedBy": {
"description": "A string that represents the Console section that manages the variable. It only works used in combination with the `readOnly` property set to `true`",
"type": "string",
"enum": [
"fast-data"
]
},
"readOnly": {
"description": "A boolean that represents if you can change the value of the variable through the Console",
"type": "boolean"
},
"fieldPath": {
"description": "The field path of the Downward API that contains the value of the variable",
"oneOf": [
{
"type": "string",
"enum": [
"metadata.name",
"metadata.namespace",
"metadata.uid",
"spec.serviceAccountName",
"spec.nodeName",
"status.hostIP",
"status.podIP",
"status.podIPs"
]
},
{
"type": "string",
"pattern": "^metadata.annotations\\['([a-zA-Z0-9][a-zA-Z0-9\\.\\-]{0,253}[\\/])?([a-zA-Z0-9][a-zA-Z0-9\\.\\-]{0,63}[a-zA-Z0-9]?)'\\]$"
},
{
"type": "string",
"pattern": "^metadata.labels\\['([a-zA-Z0-9][a-zA-Z0-9\\.\\-]{0,253}[\\/])?([a-zA-Z0-9][a-zA-Z0-9\\.\\-]{0,63}[a-zA-Z0-9]?)'\\]$"
}
]
},
"valueType": {
"const": "downwardAPI"
}
},
"required": [
"fieldPath",
"name",
"valueType"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"name": {
"description": "The variable name (generally, a key written in UPPER_SNAKE_CASE)",
"minLength": 1,
"type": "string"
},
"description": {
"description": "A brief description of the variable",
"type": "string"
},
"managedBy": {
"description": "A string that represents the Console section that manages the variable. It only works used in combination with the `readOnly` property set to `true`",
"type": "string",
"enum": [
"fast-data"
]
},
"readOnly": {
"description": "A boolean that represents if you can change the value of the variable through the Console",
"type": "boolean"
},
"fieldPath": {
"type": "string",
"enum": [
"resource.limits.cpu",
"resource.requests.cpu",
"resource.limits.memory",
"resource.requests.memory",
"resource.limits.ephemeral-storage",
"resource.requests.ephemeral-storage"
]
},
"valueType": {
"const": "downwardAPI"
},
"containerName": {
"description": "The name of the container where the field is located",
"type": "string"
}
},
"required": [
"fieldPath",
"name",
"valueType",
"containerName"
],
"type": "object"
}
]
}
]
},
"type": "array"
},
"defaultProbes": {
"description": "The readiness, liveness, and startup paths of the service. By modifying the map of the probes, you can overwrite the default paths applied by the Console",
"additionalProperties": false,
"properties": {
"liveness": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"cmd": {
"items": {
"type": "string"
},
"type": "array"
},
"failureThreshold": {
"type": "number"
},
"initialDelaySeconds": {
"type": "number"
},
"periodSeconds": {
"type": "number"
},
"successThreshold": {
"type": "number"
},
"timeoutSeconds": {
"type": "number"
}
},
"required": [
"cmd"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"failureThreshold": {
"type": "number"
},
"initialDelaySeconds": {
"type": "number"
},
"periodSeconds": {
"type": "number"
},
"port": {
"type": "string"
},
"successThreshold": {
"type": "number"
},
"timeoutSeconds": {
"type": "number"
}
},
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"failureThreshold": {
"type": "number"
},
"initialDelaySeconds": {
"type": "number"
},
"path": {
"pattern": "^\\/(([\\w\\-:.\\{\\}])\\/?)*$|^$",
"type": "string"
},
"periodSeconds": {
"type": "number"
},
"port": {
"type": "string"
},
"successThreshold": {
"type": "number"
},
"timeoutSeconds": {
"type": "number"
}
},
"required": [
"path"
],
"type": "object"
}
]
},
"readiness": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"cmd": {
"items": {
"type": "string"
},
"type": "array"
},
"failureThreshold": {
"type": "number"
},
"initialDelaySeconds": {
"type": "number"
},
"periodSeconds": {
"type": "number"
},
"successThreshold": {
"type": "number"
},
"timeoutSeconds": {
"type": "number"
}
},
"required": [
"cmd"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"failureThreshold": {
"type": "number"
},
"initialDelaySeconds": {
"type": "number"
},
"periodSeconds": {
"type": "number"
},
"port": {
"type": "string"
},
"successThreshold": {
"type": "number"
},
"timeoutSeconds": {
"type": "number"
}
},
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"failureThreshold": {
"type": "number"
},
"initialDelaySeconds": {
"type": "number"
},
"path": {
"pattern": "^\\/(([\\w\\-:.\\{\\}])\\/?)*$|^$",
"type": "string"
},
"periodSeconds": {
"type": "number"
},
"port": {
"type": "string"
},
"successThreshold": {
"type": "number"
},
"timeoutSeconds": {
"type": "number"
}
},
"required": [
"path"
],
"type": "object"
}
]
},
"startup": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"cmd": {
"items": {
"type": "string"
},
"type": "array"
},
"failureThreshold": {
"type": "number"
},
"initialDelaySeconds": {
"type": "number"
},
"periodSeconds": {
"type": "number"
},
"successThreshold": {
"type": "number"
},
"timeoutSeconds": {
"type": "number"
}
},
"required": [
"cmd"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"failureThreshold": {
"type": "number"
},
"initialDelaySeconds": {
"type": "number"
},
"periodSeconds": {
"type": "number"
},
"port": {
"type": "string"
},
"successThreshold": {
"type": "number"
},
"timeoutSeconds": {
"type": "number"
}
},
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"failureThreshold": {
"type": "number"
},
"initialDelaySeconds": {
"type": "number"
},
"path": {
"pattern": "^\\/(([\\w\\-:.\\{\\}])\\/?)*$|^$",
"type": "string"
},
"periodSeconds": {
"type": "number"
},
"port": {
"type": "string"
},
"successThreshold": {
"type": "number"
},
"timeoutSeconds": {
"type": "number"
}
},
"required": [
"path"
],
"type": "object"
}
]
}
},
"type": "object"
},
"defaultResources": {
"description": "CPU and memory limitations of the service, which can be used to overwrite the default limitations imposed by the Console for these parameters",
"additionalProperties": false,
"properties": {
"cpuLimits": {
"additionalProperties": false,
"properties": {
"max": {
"pattern": "(^((\\{\\{([A-Z])([A-Z0-9_]*)\\}\\})|(\\d+))m$)|^$",
"type": "string"
},
"min": {
"pattern": "(^((\\{\\{([A-Z])([A-Z0-9_]*)\\}\\})|(\\d+))m$)|^$",
"type": "string"
}
},
"type": "object"
},
"memoryLimits": {
"additionalProperties": false,
"properties": {
"max": {
"pattern": "(^((\\{\\{([A-Z])([A-Z0-9_]*)\\}\\})|(\\d+))Mi$)|^$",
"type": "string"
},
"min": {
"pattern": "(^((\\{\\{([A-Z])([A-Z0-9_]*)\\}\\})|(\\d+))Mi$)|^$",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"defaultSecrets": {
"description": "The default secrets, if any, to be mounted inside the container of the microservice",
"items": {
"additionalProperties": false,
"properties": {
"mountPath": {
"pattern": "^[a-zA-Z0-9-/_\\s.|\\\\!\"£$%&()=?^\"{}[\\]*+@]+$",
"type": "string"
},
"name": {
"pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$",
"type": "string"
}
},
"required": [
"name",
"mountPath"
],
"type": "object"
},
"type": "array"
},
"defaultTerminationGracePeriodSeconds": {
"type": "number"
},
"dockerImage": {
"pattern": "^(?:[a-z0-9.\\-\\/:]+\\/)?([\\w.}{\\-\\/]+)(:[\\w.}{\\-]+)?$",
"type": "string"
},
"exclusiveServiceExposure": {
"type": "boolean"
},
"name": {
"minLength": 1,
"pattern": "^[a-z]([-a-z0-9]*[a-z0-9])?$",
"type": "string"
},
"owners": {
"items": {
"additionalProperties": true,
"properties": {
"owner": {
"type": "string"
}
},
"required": [
"owner"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"name"
],
"title": "Catalog sidecar resources",
"type": "object",
"examples": [
{
"name": "e-commerce-audit-trail",
"description": "Collect audit logs from your E-Commerce",
"componentId": "e-commerce-audit",
"dockerImage": "e-commerce-audit-trail:0.2.0",
"containerPorts": [
{
"from": 8080,
"to": 80,
"name": "http"
}
],
"defaultEnvironmentVariables": [
{
"name": "LOG_LEVEL",
"valueType": "plain",
"value": "info"
}
],
"defaultConfigMaps": [
{
"name": "e-commerce-audit-service-config",
"mountPath": "/home/node",
"files": [
{
"name": "config.json",
"content": "{ \"mongodbUrl\": \"{{MONGODB_URL}}\" }"
}
]
}
],
"defaultSecrets": [
{
"name": "private-key",
"mountPath": "/home/node"
}
],
"defaultProbes": {
"liveness": {
"port": "3000",
"path": "/healthz"
},
"readiness": {
"port": "3000",
"path": "/healthz"
},
"startup": {
"port": "3000",
"path": "/healthz"
}
},
"defaultResources": {
"memoryLimits": {
"max": "250Mi",
"min": "150Mi"
},
"cpuLimits": {
"min": "150m",
"max": "200m"
}
},
"owners": [
{
"owner": "e-commerce"
}
]
}
]
}
{
"name": "e-commerce-audit-trail",
"description": "Collect audit logs from your E-Commerce",
"componentId": "e-commerce-audit",
"dockerImage": "e-commerce-audit-trail:0.2.0",
"containerPorts": [
{
"from": 8080,
"to": 80,
"name": "http"
}
],
"defaultEnvironmentVariables": [
{
"name": "LOG_LEVEL",
"valueType": "plain",
"value": "info"
}
],
"defaultConfigMaps": [
{
"name": "e-commerce-audit-service-config",
"mountPath": "/home/node",
"files": [
{
"name": "config.json",
"content": "{ \"mongodbUrl\": \"{{MONGODB_URL}}\" }"
}
]
}
],
"defaultSecrets": [
{
"name": "private-key",
"mountPath": "/home/node"
}
],
"defaultProbes": {
"liveness": {
"port": "3000",
"path": "/healthz"
},
"readiness": {
"port": "3000",
"path": "/healthz"
},
"startup": {
"port": "3000",
"path": "/healthz"
}
},
"defaultResources": {
"memoryLimits": {
"max": "250Mi",
"min": "150Mi"
},
"cpuLimits": {
"min": "150m",
"max": "200m"
}
},
"owners": [
{
"owner": "e-commerce"
}
]
}