github.com/polarismesh/polaris@v1.17.8/test/data/cluster-polaris-server.yaml (about) 1 # Tencent is pleased to support the open source community by making Polaris available. 2 # 3 # Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. 4 # 5 # Licensed under the BSD 3-Clause License (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # https://opensource.org/licenses/BSD-3-Clause 10 # 11 # Unless required by applicable law or agreed to in writing, software distributed 12 # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 13 # CONDITIONS OF ANY KIND, either express or implied. See the License for the 14 # specific language governing permissions and limitations under the License. 15 16 # server启动引导配置 17 bootstrap: 18 # 全局日志 19 logger: 20 config: 21 rotateOutputPath: log/runtime/polaris-config.log 22 errorRotateOutputPath: log/runtime/polaris-config-error.log 23 rotationMaxSize: 100 24 rotationMaxBackups: 10 25 rotationMaxAge: 7 26 outputLevel: info 27 # outputPaths: 28 # - stdout 29 # errorOutputPaths: 30 # - stderr 31 auth: 32 rotateOutputPath: log/runtime/polaris-auth.log 33 errorRotateOutputPath: log/runtime/polaris-auth-error.log 34 rotationMaxSize: 100 35 rotationMaxBackups: 10 36 rotationMaxAge: 7 37 outputLevel: info 38 # outputPaths: 39 # - stdout 40 # errorOutputPaths: 41 # - stderr 42 store: 43 rotateOutputPath: log/runtime/polaris-store.log 44 errorRotateOutputPath: log/runtime/polaris-store-error.log 45 rotationMaxSize: 100 46 rotationMaxBackups: 10 47 rotationMaxAge: 7 48 outputLevel: info 49 # outputPaths: 50 # - stdout 51 # errorOutputPaths: 52 # - stderr 53 cache: 54 rotateOutputPath: log/runtime/polaris-cache.log 55 errorRotateOutputPath: log/runtime/polaris-cache-error.log 56 rotationMaxSize: 100 57 rotationMaxBackups: 10 58 rotationMaxAge: 7 59 outputLevel: info 60 # outputPaths: 61 # - stdout 62 # errorOutputPaths: 63 # - stderr 64 naming: 65 rotateOutputPath: log/runtime/polaris-naming.log 66 errorRotateOutputPath: log/runtime/polaris-naming-error.log 67 rotationMaxSize: 100 68 rotationMaxBackups: 10 69 rotationMaxAge: 7 70 outputLevel: info 71 # outputPaths: 72 # - stdout 73 # errorOutputPaths: 74 # - stderr 75 healthcheck: 76 rotateOutputPath: log/runtime/polaris-healthcheck.log 77 errorRotateOutputPath: log/runtime/polaris-healthcheck-error.log 78 rotationMaxSize: 100 79 rotationMaxBackups: 10 80 rotationMaxAge: 7 81 outputLevel: info 82 # outputPaths: 83 # - stdout 84 # errorOutputPaths: 85 # - stderr 86 xdsv3: 87 rotateOutputPath: log/runtime/polaris-xdsv3.log 88 errorRotateOutputPath: log/polaris-xdsv3-error.log 89 rotationMaxSize: 100 90 rotationMaxBackups: 10 91 rotationMaxAge: 7 92 outputLevel: info 93 # outputPaths: 94 # - stdout 95 # errorOutputPaths: 96 # - stderr 97 apiserver: 98 rotateOutputPath: log/runtime/polaris-apiserver.log 99 errorRotateOutputPath: log/runtime/polaris-apiserver-error.log 100 rotationMaxSize: 100 101 rotationMaxBackups: 10 102 rotationMaxAge: 7 103 outputLevel: info 104 # outputPaths: 105 # - stdout 106 # errorOutputPaths: 107 # - stderr 108 token-bucket: 109 rotateOutputPath: log/runtime/polaris-ratelimit.log 110 errorRotateOutputPath: log/runtime/polaris-ratelimit-error.log 111 rotationMaxSize: 100 112 rotationMaxBackups: 10 113 rotationMaxAge: 7 114 outputLevel: info 115 # outputPaths: 116 # - stdout 117 # errorOutputPaths: 118 # - stderr 119 default: 120 rotateOutputPath: log/runtime/polaris-default.log 121 errorRotateOutputPath: log/runtime/polaris-default-error.log 122 rotationMaxSize: 100 123 rotationMaxBackups: 10 124 rotationMaxAge: 7 125 outputLevel: info 126 # outputPaths: 127 # - stdout 128 # errorOutputPaths: 129 # - stderr 130 discoverEventLocal: 131 rotateOutputPath: log/event/polaris-discoverevent.log 132 errorRotateOutputPath: log/event/polaris-discoverevent-error.log 133 rotationMaxSize: 100 134 rotationMaxBackups: 10 135 rotationMaxAge: 7 136 outputLevel: info 137 onlyContent: true 138 # outputPaths: 139 # - stdout 140 # errorOutputPaths: 141 # - stderr 142 discoverLocal: 143 rotateOutputPath: log/statis/polaris-discoverstat.log 144 errorRotateOutputPath: log/statis/polaris-discoverstat-error.log 145 rotationMaxSize: 100 146 rotationMaxBackups: 10 147 rotationMaxAge: 7 148 outputLevel: info 149 # outputPaths: 150 # - stdout 151 # errorOutputPaths: 152 # - stderr 153 local: 154 rotateOutputPath: log/statis/polaris-statis.log 155 errorRotateOutputPath: log/statis/polaris-statis-error.log 156 rotationMaxSize: 100 157 rotationMaxBackups: 10 158 rotationMaxAge: 7 159 outputLevel: info 160 # outputPaths: 161 # - stdout 162 # errorOutputPaths: 163 # - stderr 164 HistoryLogger: 165 rotateOutputPath: log/operation/polaris-history.log 166 errorRotateOutputPath: log/operation/polaris-history-error.log 167 rotationMaxSize: 100 168 rotationMaxBackups: 10 169 rotationMaxAge: 7 170 rotationMaxDurationForHour: 24 171 outputLevel: info 172 onlyContent: true 173 # outputPaths: 174 # - stdout 175 # errorOutputPaths: 176 # - stderr 177 cmdb: 178 rotateOutputPath: log/runtime/polaris-cmdb.log 179 errorRotateOutputPath: log/runtime/polaris-cmdb-error.log 180 rotationMaxSize: 100 181 rotationMaxBackups: 10 182 rotationMaxAge: 7 183 outputLevel: info 184 # outputPaths: 185 # - stdout 186 # errorOutputPaths: 187 # - stderr 188 # 按顺序启动server 189 startInOrder: 190 open: true # 是否开启,默认是关闭 191 key: sz # 全局锁 192 # 注册为北极星服务 193 polaris_service: 194 probe_address: ##DB_ADDR## 195 enable_register: true 196 isolated: false 197 services: 198 - name: polaris.checker 199 protocols: 200 - service-grpc 201 # apiserver配置 202 apiservers: 203 - name: service-eureka 204 option: 205 listenIP: "0.0.0.0" 206 listenPort: 8761 207 namespace: default 208 owner: polaris 209 refreshInterval: 10 210 deltaExpireInterval: 60 211 unhealthyExpireInterval: 180 212 connLimit: 213 openConnLimit: false 214 maxConnPerHost: 1024 215 maxConnLimit: 10240 216 whiteList: 127.0.0.1 217 purgeCounterInterval: 10s 218 purgeCounterExpired: 5s 219 - name: api-http # 协议名,全局唯一 220 option: 221 listenIP: "0.0.0.0" 222 listenPort: 8090 223 enablePprof: true # debug pprof 224 enableSwagger: true 225 connLimit: 226 openConnLimit: false 227 maxConnPerHost: 128 228 maxConnLimit: 5120 229 whiteList: 127.0.0.1 230 purgeCounterInterval: 10s 231 purgeCounterExpired: 5s 232 api: 233 admin: 234 enable: true 235 console: 236 enable: true 237 include: [ default ] 238 client: 239 enable: true 240 include: [ discover, register, healthcheck ] 241 config: 242 enable: true 243 include: [ default ] 244 - name: service-grpc 245 option: 246 listenIP: "0.0.0.0" 247 listenPort: 8091 248 connLimit: 249 openConnLimit: false 250 maxConnPerHost: 128 251 maxConnLimit: 5120 252 enableCacheProto: true 253 sizeCacheProto: 128 254 tls: 255 certFile: "" 256 keyFile: "" 257 trustedCAFile: "" 258 api: 259 client: 260 enable: true 261 include: [ discover, register, healthcheck ] 262 - name: config-grpc 263 option: 264 listenIP: "0.0.0.0" 265 listenPort: 8093 266 connLimit: 267 openConnLimit: false 268 maxConnPerHost: 128 269 maxConnLimit: 5120 270 api: 271 client: 272 enable: true 273 - name: xds-v3 274 option: 275 listenIP: "0.0.0.0" 276 listenPort: 15010 277 connLimit: 278 openConnLimit: false 279 maxConnPerHost: 128 280 maxConnLimit: 10240 281 # - name: service-l5 282 # option: 283 # listenIP: 0.0.0.0 284 # listenPort: 7779 285 # clusterName: cl5.discover 286 # 核心逻辑的配置 287 auth: 288 # auth的option现已迁移至user及strategy 289 # 在auth.option配置依然有效,但是会收到警告,提醒您尽快迁移配置至user及strategy级别下 290 user: 291 name: defaultUser 292 option: 293 # token 加密的 salt,鉴权解析 token 时需要依靠这个 salt 去解密 token 的信息 294 # salt 的长度需要满足以下任意一个:len(salt) in [16, 24, 32] 295 salt: polarismesh@2021 296 strategy: 297 name: defaultStrategy 298 option: 299 # 控制台鉴权能力开关,默认开启 300 consoleOpen: true 301 # 客户端鉴权能力开关, 默认关闭 302 clientOpen: false 303 namespace: 304 # 是否允许自动创建命名空间 305 autoCreate: true 306 naming: 307 auth: 308 open: false 309 # 批量控制器 310 batch: 311 register: 312 open: true 313 queueSize: 10240 314 waitTime: 32ms 315 maxBatchCount: 128 316 concurrency: 128 317 dropExpireTask: true 318 taskLife: 30s 319 deregister: 320 open: true 321 queueSize: 10240 322 waitTime: 32ms 323 maxBatchCount: 128 324 concurrency: 128 325 clientRegister: 326 open: true 327 queueSize: 10240 328 waitTime: 32s 329 maxBatchCount: 1024 330 concurrency: 64 331 clientDeregister: 332 open: true 333 queueSize: 10240 334 waitTime: 32ms 335 maxBatchCount: 32 336 concurrency: 64 337 # 健康检查的配置 338 healthcheck: 339 open: true 340 service: polaris.checker 341 slotNum: 30 342 minCheckInterval: 1s 343 maxCheckInterval: 30s 344 clientReportInterval: 120s 345 batch: 346 heartbeat: 347 open: true 348 queueSize: 10240 349 waitTime: 32ms 350 maxBatchCount: 32 351 concurrency: 64 352 checkers: 353 - name: heartbeatRedis 354 option: 355 kvAddr: ##REDIS_ADDR## 356 # ACL user from redis v6.0, remove it if ACL is not available 357 kvUser: ##REDIS_USER# 358 kvPasswd: ##REDIS_PWD## 359 poolSize: 200 360 minIdleConns: 30 361 idleTimeout: 120s 362 connectTimeout: 200ms 363 msgTimeout: 200ms 364 concurrency: 200 365 withTLS: false 366 # 配置中心模块启动配置 367 config: 368 # 是否启动配置模块 369 open: true 370 # 缓存配置 371 cache: 372 open: true 373 resources: 374 - name: service # 加载服务数据 375 option: 376 disableBusiness: false # 不加载业务服务 377 needMeta: true # 加载服务元数据 378 - name: instance # 加载实例数据 379 option: 380 disableBusiness: false # 不加载业务服务实例 381 needMeta: true # 加载实例元数据 382 - name: routingConfig # 加载路由数据 383 - name: rateLimitConfig # 加载限流数据 384 - name: circuitBreakerConfig # 加载熔断数据 385 - name: users # 加载用户、用户组数据 386 - name: strategyRule # 加载鉴权规则数据 387 - name: namespace # 加载命名空间数据 388 - name: client # 加载命名空间数据 389 - name: configFile 390 option: 391 #配置文件缓存过期时间,单位s 392 expireTimeAfterWrite: 3600 393 - name: faultDetectRule 394 # - name: l5 # 加载l5数据 395 # 存储配置 396 store: 397 # 单机文件存储插件 398 # name: boltdbStore 399 # option: 400 # path: ./polaris.bolt 401 ## 数据库存储插件 402 name: defaultStore 403 option: 404 master: 405 dbType: mysql 406 dbName: polaris_server 407 dbUser: ##DB_USER## 408 dbPwd: ##DB_PWD## 409 dbAddr: ##DB_ADDR## 410 maxOpenConns: 300 411 maxIdleConns: 50 412 connMaxLifetime: 300 # 单位秒 413 txIsolationLevel: 2 #LevelReadCommitted 414 # 插件配置 415 plugin: 416 # whitelist: 417 # name: whitelist 418 # option: 419 # ip: [127.0.0.1] 420 history: 421 entries: 422 - name: HistoryLogger 423 discoverEvent: 424 entries: 425 - name: discoverEventLocal 426 discoverStatis: 427 name: discoverLocal 428 option: 429 interval: 60 # 统计间隔,单位为秒 430 statis: 431 name: local 432 option: 433 interval: 60 # 统计间隔,单位为秒 434 ratelimit: 435 name: token-bucket 436 option: 437 remote-conf: false # 是否使用远程配置 438 ip-limit: # ip级限流,全局 439 open: true # 系统是否开启ip级限流 440 global: 441 open: true 442 bucket: 300 # 最高峰值 443 rate: 200 # 平均一个IP每秒的请求数 444 resource-cache-amount: 1024 # 最大缓存的IP个数 445 white-list: [ 127.0.0.1 ] 446 instance-limit: 447 open: true 448 global: 449 bucket: 200 450 rate: 100 451 resource-cache-amount: 1024 452 api-limit: # 接口级限流 453 open: false # 是否开启接口限流,全局开关,只有为true,才代表系统的限流开启。默认关闭 454 rules: 455 - name: store-read 456 limit: 457 open: true # 接口的全局配置,如果在api子项中,不配置,则该接口依据global来做限制 458 bucket: 2000 # 令牌桶最大值 459 rate: 1000 # 每秒产生的令牌数 460 - name: store-write 461 limit: 462 open: true 463 bucket: 1000 464 rate: 500 465 apis: 466 - name: "POST:/v1/naming/services" 467 rule: store-write 468 - name: "PUT:/v1/naming/services" 469 rule: store-write 470 - name: "POST:/v1/naming/services/delete" 471 rule: store-write 472 - name: "GET:/v1/naming/services" 473 rule: store-read 474 - name: "GET:/v1/naming/services/count" 475 rule: store-read