{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://judkins.house/apis/k2/v1/etcdConfig.json",
    "$$target": "etcdConfig.json",
    "title": "etcd Configuration",
    "description": "Describes the configuration of etcd.",
    "properties": {
        "name": {
            "description": "Name of etcd configuration",
            "type": "string"
        },
        "type": {
            "description": "Type of kvStore",
            "enum": [
                "etcd"
            ],
            "type": "string"
        },
        "kind": {
            "description": "Type of etcdConfig",
            "enum": [
                "kvStore"
            ],
            "type": "string"
        },
        "clientPorts": {
            "description": "Ports used to listen for client requests.",
            "items": {
                "type": "number"
            },
            "minItems": 1,
            "type": "array",
            "default": [
                2379,
                4001
            ]
        },
        "clusterToken": {
            "description": "Token used during etcd cluster formation. This may be unsafe if an etcd cluster formation has to be restarted, or multiple clusters are created within the same VPC. It is highly recommended that the uuidToken option be used instead.",
            "type": "string",
            "default": "espouse-monger-rarely"
        },
        "uuidToken": {
            "description": "If true, uuidgen will be used to generate a unique token for each etcd cluster. uuidToken takes precedence over clusterToken, and if neither are specified then the etcd defaults are used.",
            "type": "boolean",
            "default": true
        },
        "peerPorts": {
            "description": "Ports used for peer to peer communication",
            "items": {
                "type": "number"
            },
            "minItems": 1,
            "type": "array",
            "default": [
                2380
            ]
        },
        "ssl": {
            "description": "Whether or not SSL is used for etcd traffic",
            "type": "boolean"
        },
        "version": {
            "description": "Version of etcd container which will be run",
            "type": "string"
        }
    },
    "required": [
        "type",
        "clientPorts",
        "peerPorts",
        "ssl",
        "version"
    ],
    "additionalProperties": false,
    "type": "object"
}