"oneOf": [
{ "$ref": "#/definitions/publisher_http" },
{ "$ref": "#/definitions/publisher_message_router" },
- { "$ref": "#/definitions/publisher_data_router" }
+ { "$ref": "#/definitions/publisher_data_router" },
+ { "$ref": "#/definitions/publisher_kafka" }
]
}
},
"oneOf": [
{ "$ref": "#/definitions/subscriber_http" },
{ "$ref": "#/definitions/subscriber_message_router" },
- { "$ref": "#/definitions/subscriber_data_router" }
+ { "$ref": "#/definitions/subscriber_data_router" },
+ { "$ref": "#/definitions/subscriber_kafka" }
]
}
}
"type"
]
},
+ "stream_kafka": {
+ "type": "object",
+ "properties": {
+ "format": {
+ "$ref": "#/definitions/name"
+ },
+ "version": {
+ "$ref": "#/definitions/version"
+ },
+ "config_key": {
+ "type": "string"
+ },
+ "type": {
+ "description": "Type of stream to be used",
+ "type": "string",
+ "enum": [
+ "kafka"
+ ]
+ }
+ },
+ "required": [
+ "format",
+ "version",
+ "config_key",
+ "type"
+ ]
+ },
"publisher_http": {
"type": "object",
"properties": {
"type"
]
},
+ "publisher_kafka": {
+ "$ref": "#/definitions/stream_kafka"
+ },
"subscriber_http": {
"type": "object",
"properties": {
"config_key"
]
},
+ "subscriber_kafka": {
+ "$ref": "#/definitions/stream_kafka"
+ },
"provider" : {
"oneOf" : [
{"$ref": "#/definitions/docker-provider"},
"type": "array",
"items": {
"type": "object",
- "properties": {
- "host":{
- "type":"object",
- "path": {"type": "string"}
- },
- "container":{
- "type":"object",
- "bind": { "type": "string"},
- "mode": { "type": "string"}
- }
- }
+ "oneOf": [
+ { "$ref": "#/definitions/host_path_volume" },
+ { "$ref": "#/definitions/config_map_volume" }
+ ]
}
}
},
],
"additionalProperties": false
},
+ "host_path_volume": {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "object",
+ "path": {
+ "type": "string"
+ }
+ },
+ "container": {
+ "type": "object",
+ "bind": {
+ "type": "string"
+ },
+ "mode": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "config_map_volume": {
+ "type": "object",
+ "properties": {
+ "config_volume": {
+ "type": "object",
+ "name": {
+ "type": "string"
+ }
+ },
+ "container": {
+ "type": "object",
+ "bind": {
+ "type": "string"
+ },
+ "mode": {
+ "type": "string"
+ }
+ }
+ }
+ },
"docker_healthcheck_http": {
"properties": {
"type": {
| | | ``message_router`` |
| | | , |
| | | ``data_router`` |
+| | | , |
+| | | ``kafka`` |
+-------------+----+--------------------+
.. _message-router:
...
}
+.. _kafka:
+
+Kafka
+''''''''''''''
+
+Kafka subscribers are clients fetching data directly from kafka.
+
+``config_key``:
+
+.. code:: json
+
+ "streams": {
+ "subscribes": [{
+ "format": "dcae.some-format",
+ "version": "1.0.0",
+ "config_key": "some_format_handle",
+ "type": "kafka"
+ }],
+ ...
+ }
+
Publishes
^^^^^^^^^
| | | ``message_router`` |
| | | , |
| | | ``data_router`` |
+| | | , |
+| | | ``kafka`` |
+-------------+----+--------------------+
.. message-router-1:
}]
}
+.. kafka-1:
+
+Kafka
+''''''''''''''
+
+Kafka publishers are clients publishing data directly to kafka.
+
+``config_key``:
+
+.. code:: json
+
+ "streams": {
+ "publishes": [{
+ "format": "dcae.some-format",
+ "version": "1.0.0",
+ "config_key": "some_format_handle",
+ "type": "kafka"
+ }],
+ ...
+ }
+
Quick Reference
^^^^^^^^^^^^^^^
"type": "array",
"items": {
"type": "object",
- "properties": {
- "host":{
- "type":"object",
- "path": {"type": "string"}
- },
- "container":{
- "type":"object",
- "bind": { "type": "string"},
- "mode": { "type": "string"}
- }
- }
+ "oneOf": [
+ { "$ref": "#/definitions/host_path_volume" },
+ { "$ref": "#/definitions/config_map_volume" }
+ ]
}
}
},
| | | host port. See example |\r
| | | below. |\r
+--------------------------------+---------+---------------------------+\r
-| volume | JSON | each array item contains |\r
-| | array | a host and container |\r
-| | | object. See example |\r
-| | | below. |\r
+| volumes | JSON | each array item contains |\r
+| | array | volume definition of eith\|\r
+| | | er: host path or config m\|\r
+| | | ap volume. |\r
+--------------------------------+---------+---------------------------+\r
| policy | JSON | *Required*. Policy |\r
| | array | reconfiguration script |\r
"host": {\r
"path": "/var/run/docker.sock"\r
}\r
+ },\r
+ {\r
+ "container": {\r
+ "bind": "/tmp/mount_path"\r
+ "mode": "ro"\r
+ },\r
+ "config_volume": {\r
+ "name": "config_map_name"\r
+ }\r
}\r
]\r
}\r
+---------------+-------+-------------------------------------+\r
| Property Name | Type | Description |\r
+===============+=======+=====================================+\r
-| volumes | array | Contains container and host objects |\r
+| volumes | array | Contains container with host/config\|\r
+| | | _volume objects |\r
+---------------+-------+-------------------------------------+\r
\r
The ``container`` object contains:\r
| path | string | path to the host volume |\r
+---------------+--------+-------------------------+\r
\r
-Here’s an example of the minimal JSON that must be provided as an input:\r
+The ``config_volume`` object contains:\r
+\r
++---------------+--------+-------------------------+\r
+| Property Name | Type | Description |\r
++===============+========+=========================+\r
+| name | string | name of config map |\r
++---------------+--------+-------------------------+\r
+\r
+Here is an example of the minimal JSON with host path volume that must be provided as an input:\r
\r
.. code:: json\r
\r
In the example above, the container volume “/tmp/docker.sock” maps to\r
host volume “/var/run/docker.sock”.\r
\r
+Here is an example of the minimal JSON with config map volume that must be provided as an input:\r
+\r
+.. code:: json\r
+\r
+ "auxilary": {\r
+ "volumes": [\r
+ {\r
+ "container": {\r
+ "bind": "/tmp/mount_path"\r
+ },\r
+ "config_volume": {\r
+ "name": "config_map_name"\r
+ }\r
+ }\r
+ ]\r
+ }\r
+\r
+In the example above, config map named "config_map_name" is mounted at "/tmp/mount_path".\r
\r
Policy \r
~~~~~~~\r