This repository has been archived by the owner on Apr 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
config-example.yaml
105 lines (101 loc) · 3.73 KB
/
config-example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
logger:
level: debug # debug,info,error
logger: console # console vs file
log-file: syncer.log # The file name of the logger output, does not exist automatically
date-slice: y # Cut the document by date, support "y" (year), "m" (month), "d" (day), "h" (hour), default "y".
discovery-servers:
nacos1:
type: nacos
weight: 100
prefix: /nacos/v1/
host: "http://nacos-server:8858"
eureka1:
type: eureka
weight: 100
prefix: /eureka/
host: "http://admin:admin@eureka-server:8761"
gateway-servers:
apisix1:
type: apisix
admin-url: http://apisix-server:9080
prefix: /apisix/admin/
config:
X-API-KEY: edd1c9f034335f136f87ad84b625c8f1
kong1:
type: kong
admin-url: http://kong-server:8001
prefix: /upstreams/
targets:
- discovery: nacos1
gateway: apisix1
enabled: false
fetch-interval: "@every 10s"
maximum-interval-sec: 20
config:
groupName: DEFAULT_GROUP
namespaceId: test
template: |
{
"id": "{{.Name}}",
"timeout": {
"connect": 30,
"send": 30,
"read": 30
},
"name": "{{.Name}}",
"nodes": {{.Nodes}},
"type":"roundrobin",
"desc": "auto sync by https://github.com/anjia0532/discovery-syncer"
}
- discovery: eureka1
gateway: kong1
enabled: false
fetch-interval: "@every 5s"
maximum-interval-sec: 10
config:
template: |
{
"name": "{{.Name}}",
"algorithm": "round-robin",
"hash_on": "none",
"hash_fallback": "none",
"hash_on_cookie_path": "/",
"slots": 10000,
"healthchecks": {
"passive": {
"healthy": {
"http_statuses": [200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308],
"successes": 0
},
"type": "http",
"unhealthy": {
"http_statuses": [429, 500, 503],
"timeouts": 0,
"http_failures": 0,
"tcp_failures": 0
}
},
"active": {
"timeout": 1,
"https_sni": "example.com",
"http_path": "/",
"concurrency": 10,
"https_verify_certificate": true,
"type": "http",
"healthy": {
"http_statuses": [200, 302],
"successes": 0,
"interval": 0
},
"unhealthy": {
"http_statuses": [429, 404, 500, 501, 502, 503, 504, 505],
"timeouts": 0,
"http_failures": 0,
"interval": 0,
"tcp_failures": 0
}
},
"threshold": 0
},
"tags": ["discovery-syncer-auto"]
}