Last active
September 30, 2016 10:13
-
-
Save gquintard/ade655a67d66b5d443430681280198c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"description": "Varnish Configuration Object", | |
"type": "object", | |
"required": ["backends", "rules"], | |
"properties": { | |
"backends": { | |
"description": "list of origin servers", | |
"type": "array", | |
"items": { | |
"type": "object", | |
"required": ["name", "host"], | |
"properties": { | |
"name": { "type": "string" }, | |
"host": { "type": "string" }, | |
"port": { "type": "number" } | |
} | |
}, | |
"probes": { | |
"description": "list of backend probes", | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"url": { "type": "string" }, | |
"timeout": { "type": "number" }, | |
"interval": { "type": "number" }, | |
"window": { "type": "number" }, | |
"threashold": { "type": "number" } | |
} | |
}, | |
"clusters": { | |
"description": "list of server pools", | |
"type": "array", | |
"items": { | |
"type": "object", | |
"required": ["name", "strategy", "backends"], | |
"properties": { | |
"name": { "type": "string" }, | |
"strategy": { | |
"type": "string", | |
"oneOf": [ | |
{ "format": "round_robin"}, | |
{ "format": "fallback"}, | |
{ "format": "hash"}, | |
{ "format": "random"} | |
] | |
}, | |
"backends": { | |
"type": "array", | |
"items": "strings" | |
} | |
} | |
} | |
}, | |
"rules": { | |
"description": "list of inbound rules", | |
"type": "array", | |
"items": { | |
"type": "object", | |
"required": ["check", "route"], | |
"properties": { | |
"check": { | |
"type": "string", | |
"oneOf": [ | |
{ "format": "default"}, | |
{ "format": "equal"}, | |
{ "format": "not-equal"}, | |
{ "format": "regex"}, | |
{ "format": "not-regex"}, | |
{ "format": "startswith"}, | |
{ "format": "not-startwith"}, | |
{ "format": "wildcard"}, | |
{ "format": "not-wildcard"} | |
] | |
}, | |
"field": { | |
"type": "string", | |
"oneOf": [ | |
{ "format": "url"}, | |
{ "format": "path"}, | |
{ "format": "querystring"}, | |
{ "format": "host"}, | |
] | |
}, | |
"pattern": {"type": "string"}, | |
"route": {"type": "string"}, | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment