github.com/polarismesh/polaris@v1.17.8/test/data/service_test.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: error 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: error 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: error 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: error 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: error 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: error 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: error 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: error 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: error 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: error 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: error 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: error 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: error 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: error 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: error 184 # outputPaths: 185 # - stdout 186 # errorOutputPaths: 187 # - stderr 188 polaris_service: 189 # probe_address: ##DB_ADDR## 190 enable_register: true 191 isolated: false 192 services: 193 - name: polaris.checker 194 protocols: 195 - service-grpc 196 # 核心逻辑的配置 197 auth: 198 # auth的option现已迁移至user及strategy 199 # 在auth.option配置依然有效,但是会收到警告,提醒您尽快迁移配置至user及strategy级别下 200 user: 201 name: defaultUser 202 option: 203 # token 加密的 salt,鉴权解析 token 时需要依靠这个 salt 去解密 token 的信息 204 # salt 的长度需要满足以下任意一个:len(salt) in [16, 24, 32] 205 salt: polarismesh@2021 206 strategy: 207 name: defaultStrategy 208 option: 209 # 控制台鉴权能力开关,默认开启 210 consoleOpen: true 211 # 客户端鉴权能力开关, 默认关闭 212 clientOpen: false 213 namespace: 214 # 是否允许自动创建命名空间 215 autoCreate: true 216 naming: 217 auth: 218 open: false 219 # 批量控制器 220 batch: 221 register: 222 open: true 223 queueSize: 10240 224 waitTime: 32ms 225 maxBatchCount: 32 226 concurrency: 64 227 deregister: 228 open: true 229 queueSize: 10240 230 waitTime: 32ms 231 maxBatchCount: 32 232 concurrency: 64 233 clientRegister: 234 open: true 235 queueSize: 10240 236 waitTime: 32ms 237 maxBatchCount: 1024 238 concurrency: 64 239 clientDeregister: 240 open: true 241 queueSize: 10240 242 waitTime: 32ms 243 maxBatchCount: 32 244 concurrency: 64 245 # 配置中心模块启动配置 246 config: 247 # 是否启动配置模块 248 open: true 249 cache: 250 #配置文件缓存过期时间,单位s 251 expireTimeAfterWrite: 3600 252 # 健康检查的配置 253 healthcheck: 254 open: true 255 service: polaris.checker 256 slotNum: 30 257 minCheckInterval: 1s 258 maxCheckInterval: 30s 259 clientCheckInterval: 1s 260 clientCheckTtl: 2s 261 batch: 262 heartbeat: 263 open: true 264 queueSize: 10240 265 waitTime: 32ms 266 maxBatchCount: 32 267 concurrency: 64 268 checkers: 269 - name: heartbeatMemory 270 # 缓存配置 271 cache: 272 open: true 273 resources: 274 - name: service # 加载服务数据 275 option: 276 disableBusiness: false # 不加载业务服务 277 needMeta: true # 加载服务元数据 278 - name: instance # 加载实例数据 279 option: 280 disableBusiness: false # 不加载业务服务实例 281 needMeta: true # 加载实例元数据 282 - name: routingConfig # 加载路由数据 283 - name: rateLimitConfig # 加载限流数据 284 - name: circuitBreakerConfig # 加载熔断数据 285 - name: users # 加载用户、用户组数据 286 - name: strategyRule # 加载鉴权规则数据 287 - name: namespace # 加载命名空间数据 288 - name: client # 加载命名空间数据 289 - name: configFile # 配置文件发布缓存 290 - name: configGroup # 加载配置分组缓存 291 - name: faultDetectRule 292 # - name: l5 # 加载l5数据 293 # 存储配置 294 store: 295 # 单机文件存储插件 296 name: boltdbStore 297 option: 298 path: ./polaris.bolt 299 # 插件配置 300 plugin: 301 crypto: 302 entries: 303 - name: AES 304 history: 305 entries: 306 - name: HistoryLogger 307 discoverEvent: 308 entries: 309 - name: discoverEventLocal 310 discoverStatis: 311 name: discoverLocal 312 option: 313 interval: 60 # 统计间隔,单位为秒 314 outputPath: ./discover-statis 315 statis: 316 name: local 317 option: 318 interval: 60 # 统计间隔,单位为秒 319 outputPath: ./statis 320 # api 调用指标数据计算上报到 prometheus 321 # name: prometheus 322 # option: 323 # interval: 60 # 统计间隔,单位为秒 324 ratelimit: 325 name: token-bucket 326 option: 327 remote-conf: false # 是否使用远程配置 328 ip-limit: # ip级限流,全局 329 open: true # 系统是否开启ip级限流 330 global: 331 open: true 332 bucket: 300 # 最高峰值 333 rate: 200 # 平均一个IP每秒的请求数 334 resource-cache-amount: 1024 # 最大缓存的IP个数 335 white-list: [127.0.0.1] 336 instance-limit: 337 open: true 338 global: 339 bucket: 200 340 rate: 100 341 resource-cache-amount: 1024 342 api-limit: # 接口级限流 343 open: false # 是否开启接口限流,全局开关,只有为true,才代表系统的限流开启。默认关闭 344 rules: 345 - name: store-read 346 limit: 347 open: true # 接口的全局配置,如果在api子项中,不配置,则该接口依据global来做限制 348 bucket: 2000 # 令牌桶最大值 349 rate: 1000 # 每秒产生的令牌数 350 - name: store-write 351 limit: 352 open: true 353 bucket: 1000 354 rate: 500 355 apis: 356 - name: "POST:/v1/naming/services" 357 rule: store-write 358 - name: "PUT:/v1/naming/services" 359 rule: store-write 360 - name: "POST:/v1/naming/services/delete" 361 rule: store-write 362 - name: "GET:/v1/naming/services" 363 rule: store-read 364 - name: "GET:/v1/naming/services/count" 365 rule: store-read