{
    "properties": {
        "configurations": {
            "description": "Kong configuration properties.",
            "properties": {
                "cassandra": {
                    "description": "Cassandra connection properties.",
                    "properties": {
                        "contact-points": {
                            "default": "node-0.cassandra.mesos, node-1.cassandra.mesos, node-2.cassandra.mesos",
                            "description": "A comma-separated list of contact points.",
                            "type": "string"
                        },
                        "keyspace": {
                            "default": "kong",
                            "description": "Cassandra keyspace.",
                            "type": "string"
                        },
                        "port": {
                            "default": 9042,
                            "description": "The port on which cassandra nodes are listening on.",
                            "type": "integer"
                        },
                        "use-cassandra": {
                            "default": false,
                            "description": "If true, Cassandra is used as Kong datastore.",
                            "title": "Use Cassandra as Kong datastore?",
                            "type": "boolean"
                        }
                    },
                    "type": "object"
                },
                "custom-envs": {
                    "description": "A space-separated list Kong configurations. Please avoid updating properties which already being set through other properties above.",
                    "pattern": "^(KONG_\\w+=\\S+)*(\\sKONG_\\w+=\\S+)*$",
                    "type": "string"
                },
                "log-level": {
                    "default": "notice",
                    "description": "Log level of the Kong server.",
                    "type": "string"
                },
                "postgres": {
                    "description": "Postgres connection properties.",
                    "properties": {
                        "database": {
                            "default": "kong",
                            "description": "Postgres database name.",
                            "type": "string"
                        },
                        "host": {
                            "default": "postgresql.marathon.l4lb.thisdcos.directory",
                            "description": "Postgres host address.",
                            "type": "string"
                        },
                        "password": {
                            "default": "kong",
                            "description": "Postgres password.",
                            "type": "string"
                        },
                        "port": {
                            "default": 5432,
                            "description": "Postgres port.",
                            "type": "integer"
                        },
                        "user": {
                            "default": "kong",
                            "description": "Postgres user.",
                            "type": "string"
                        }
                    },
                    "type": "object"
                }
            },
            "type": "object"
        },
        "networking": {
            "description": "Marathon-LB service configuration properties.",
            "properties": {
                "admin": {
                    "description": "Kong's Admin port configuration.",
                    "properties": {
                        "external-access": {
                            "default": false,
                            "description": "Enable or disable creating a VIP for external access through a public node running Marathon-LB.",
                            "title": "Allow external access",
                            "type": "boolean"
                        },
                        "https-redirect": {
                            "default": false,
                            "description": "Whether Marathon-lb should redirect HTTP traffic to HTTPS. This requires 'virtual-host' to be set.",
                            "type": "boolean"
                        },
                        "service-port": {
                            "default": 10202,
                            "description": "Port number to be used for external traffic to cluster through Marathon-LB load balancer.",
                            "type": "integer"
                        },
                        "virtual-host": {
                            "description": "The virtual host address to integrate Kong proxy port with Marathon-lb.",
                            "type": "string"
                        }
                    },
                    "type": "object"
                },
                "proxy": {
                    "description": "Kong's Proxy port configuration.",
                    "properties": {
                        "external-access": {
                            "default": true,
                            "description": "Enable or disable creating a VIP for external access through a public node running Marathon-LB.",
                            "title": "Allow external access",
                            "type": "boolean"
                        },
                        "https-redirect": {
                            "default": false,
                            "description": "Whether Marathon-lb should redirect HTTP traffic to HTTPS. This requires 'virtual-host' to be set.",
                            "type": "boolean"
                        },
                        "service-port": {
                            "default": 10201,
                            "description": "Port number to be used for external traffic to cluster through Marathon-LB load balancer.",
                            "type": "integer"
                        },
                        "virtual-host": {
                            "description": "The virtual host address to integrate Kong proxy port with Marathon-lb.",
                            "type": "string"
                        }
                    },
                    "type": "object"
                }
            },
            "type": "object"
        },
        "service": {
            "description": "DC/OS service configuration properties",
            "properties": {
                "cpus": {
                    "default": 1,
                    "description": "CPU shares to allocate to each instance.",
                    "minimum": 1,
                    "type": "number"
                },
                "instances": {
                    "default": 1,
                    "description": "Number of instances to run.",
                    "minimum": 1,
                    "type": "integer"
                },
                "mem": {
                    "default": 512,
                    "description": "Memory (MB) to allocate to each task.",
                    "minimum": 512,
                    "type": "number"
                },
                "name": {
                    "default": "kong",
                    "description": "The name of this Kong instance.",
                    "type": "string"
                },
                "role": {
                    "default": "*",
                    "description": "Deploy Kong only on nodes with this role.",
                    "type": "string"
                }
            },
            "required": [
                "name",
                "instances",
                "cpus",
                "mem",
                "role"
            ],
            "type": "object"
        }
    },
    "type": "object"
}