Skip to content

Commit

Permalink
release:1.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun committed Dec 2, 2022
1 parent a444c2a commit 526cf93
Showing 1 changed file with 36 additions and 70 deletions.
106 changes: 36 additions & 70 deletions polaris-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.

# server启动引导配置
bootstrap:
# 全局日志
logger:
config:
rotateOutputPath: log/polaris-config.log
Expand Down Expand Up @@ -183,11 +181,10 @@ bootstrap:
- stdout
errorOutputPaths:
- stderr
# 按顺序启动server
#
startInOrder:
open: true # 是否开启,默认是关闭
key: sz # 全局锁
# 注册为北极星服务
open: true
key: sz
polaris_service:
# probe_address: ##DB_ADDR##
enable_register: true
Expand All @@ -196,7 +193,6 @@ bootstrap:
- name: polaris.checker
protocols:
- service-grpc
# apiserver配置
apiservers:
- name: service-eureka
option:
Expand All @@ -214,7 +210,7 @@ apiservers:
whiteList: 127.0.0.1
purgeCounterInterval: 10s
purgeCounterExpired: 5s
- name: api-http # 协议名,全局唯一
- name: api-http
option:
listenIP: "0.0.0.0"
listenPort: 8090
Expand All @@ -232,13 +228,13 @@ apiservers:
enable: true
console:
enable: true
include: [ default ]
include: [default]
client:
enable: true
include: [ discover, register, healthcheck ]
include: [discover, register, healthcheck]
config:
enable: true
include: [ default ]
include: [default]
- name: service-grpc
option:
listenIP: "0.0.0.0"
Expand All @@ -256,7 +252,7 @@ apiservers:
api:
client:
enable: true
include: [ discover, register, healthcheck ]
include: [discover, register, healthcheck]
- name: config-grpc
option:
listenIP: "0.0.0.0"
Expand Down Expand Up @@ -289,25 +285,17 @@ apiservers:
# listenIP: 0.0.0.0
# listenPort: 7779
# clusterName: cl5.discover
# 核心逻辑的配置
auth:
# 鉴权插件
name: defaultAuth
option:
# token 加密的 salt,鉴权解析 token 时需要依靠这个 salt 去解密 token 的信息
# salt 的长度需要满足以下任意一个:len(salt) in [16, 24, 32]
salt: polarismesh@2021
# 控制台鉴权能力开关,默认开启
consoleOpen: true
# 客户端鉴权能力开关, 默认关闭
clientOpen: false
namespace:
# 是否允许自动创建命名空间
autoCreate: true
naming:
auth:
open: false
# 批量控制器
batch:
register:
open: true
Expand Down Expand Up @@ -335,7 +323,6 @@ naming:
waitTime: 32ms
maxBatchCount: 32
concurrency: 64
# 健康检查的配置
healthcheck:
open: true
service: polaris.checker
Expand Down Expand Up @@ -365,54 +352,33 @@ healthcheck:
# msgTimeout: 200ms
# concurrency: 200
# withTLS: false
# 配置中心模块启动配置
config:
# 是否启动配置模块
open: true
# 缓存配置
cache:
open: true
resources:
- name: service # 加载服务数据
- name: service
option:
disableBusiness: false # 不加载业务服务
needMeta: true # 加载服务元数据
- name: instance # 加载实例数据
disableBusiness: false
needMeta: true
- name: instance
option:
disableBusiness: false # 不加载业务服务实例
needMeta: true # 加载实例元数据
- name: routingConfig # 加载路由数据
- name: rateLimitConfig # 加载限流数据
- name: circuitBreakerConfig # 加载熔断数据
- name: users # 加载用户、用户组数据
- name: strategyRule # 加载鉴权规则数据
- name: namespace # 加载命名空间数据
- name: client # 加载 SDK 数据
disableBusiness: false
needMeta: true
- name: routingConfig
- name: rateLimitConfig
- name: circuitBreakerConfig
- name: users
- name: strategyRule
- name: namespace
- name: client
- name: configFile
option:
#配置文件缓存过期时间,单位s
expireTimeAfterWrite: 3600
# - name: l5 # 加载l5数据
# 存储配置
store:
# 单机文件存储插件
name: boltdbStore
option:
path: ./polaris.bolt
## 数据库存储插件
# name: defaultStore
# option:
# master:
# dbType: mysql
# dbName: polaris_server
# dbUser: ##DB_USER##
# dbPwd: ##DB_PWD##
# dbAddr: ##DB_ADDR##
# maxOpenConns: 300
# maxIdleConns: 50
# connMaxLifetime: 300 # 单位秒
# txIsolationLevel: 2 #LevelReadCommitted
# 插件配置
plugin:
# whitelist:
# name: whitelist
Expand All @@ -431,37 +397,37 @@ plugin:
discoverStatis:
name: discoverLocal
option:
interval: 60 # 统计间隔,单位为秒
interval: 60
statis:
name: local
option:
interval: 60 # 统计间隔,单位为秒
interval: 60
ratelimit:
name: token-bucket
option:
remote-conf: false # 是否使用远程配置
ip-limit: # ip级限流,全局
open: true # 系统是否开启ip级限流
remote-conf: false
ip-limit:
open: true
global:
open: true
bucket: 300 # 最高峰值
rate: 200 # 平均一个IP每秒的请求数
resource-cache-amount: 1024 # 最大缓存的IP个数
white-list: [ 127.0.0.1 ]
bucket: 300
rate: 200
resource-cache-amount: 1024
white-list: [127.0.0.1]
instance-limit:
open: true
global:
bucket: 200
rate: 100
resource-cache-amount: 1024
api-limit: # 接口级限流
open: false # 是否开启接口限流,全局开关,只有为true,才代表系统的限流开启。默认关闭
api-limit:
open: false
rules:
- name: store-read
limit:
open: true # 接口的全局配置,如果在api子项中,不配置,则该接口依据global来做限制
bucket: 2000 # 令牌桶最大值
rate: 1000 # 每秒产生的令牌数
open: true
bucket: 2000
rate: 1000
- name: store-write
limit:
open: true
Expand All @@ -477,4 +443,4 @@ plugin:
- name: "GET:/v1/naming/services"
rule: store-read
- name: "GET:/v1/naming/services/count"
rule: store-read
rule: store-read

0 comments on commit 526cf93

Please sign in to comment.