Created
June 29, 2020 05:58
-
-
Save ryojiro/baac94ceb615949c7ea54e36ba94b70a to your computer and use it in GitHub Desktop.
itacho generate での記述例
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
{ | |
"dependencies": [ | |
{ | |
"circuit_breaker": { | |
"max_connections": 256, | |
"max_pending_requests": 512, | |
"max_retries": 2 | |
}, | |
"cluster_name": "upstream1", | |
"connect_timeout_ms": 3000, | |
"lb": "upstream1.example.com:80", | |
"name": "upstream1", | |
"routes": [ | |
{ | |
"prefix": "/", | |
"retry_policy": { | |
"num_retries": 3, | |
"per_try_timeout_ms": 3000, | |
"retry_on": "5xx,connect-failure,refused-stream" | |
}, | |
"timeout_ms": 10000 | |
} | |
], | |
"tls": false | |
} | |
], | |
"version": 1 | |
} |
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
local upstream1 = import 'lib/upstreams/upstream1.libsonnet'; | |
local env = 'production'; | |
{ | |
version: 1, | |
dependencies: [ | |
upstream1[env], | |
], | |
} |
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
local circuitBreakers = import '../circuit_breakers.libsonnet'; | |
local routes = import '../routes.libsonnet'; | |
local name = 'upstream1'; | |
{ | |
production: { | |
name: name, | |
cluster_name: 'upstream1', | |
lb: 'upstream1.example.com:80', | |
tls: false, | |
connect_timeout_ms: 3000, | |
circuit_breaker: circuitBreakers.default, | |
routes: [routes.default], | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment