blob: 2116016a0579cd1e5ccf85853382d581f44c589c [file] [log] [blame]
#################################################
# global configs #
#################################################
# it's not recommended to change this version
version: 2.5.1
admin:
enabled: true
# replicas of admin, K8s will load balance the requests
replicas: 1
image: apache/shenyu-admin
service:
port: 9095
targetPod: 9095
# if you want to change "admin service port", please edit here
nodePort: 31095
# jvm options for admin
javaOpts: ""
# K8s resources quota for admin
resources:
# requests:
# cpu: 100m
# memory: 512Mi
# limits:
# cpu: 1000m
# memory: 1024Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 75
targetMemoryUtilizationPercentage: 75
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: shenyu-admin.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
bootstrap:
enabled: true
# replicas of bootstrap, K8s will load balance the requests
replicas: 2
image: apache/shenyu-bootstrap
service:
port: 9195
targetPod: 9195
# if you want to change "bootstrap service port", please edit here
nodePort: 31195
# jvm options for bootstrap
javaOpts: ""
# K8s resources quota for bootstrap
resources:
# requests:
# cpu: 100m
# memory: 512Mi
# limits:
# cpu: 1000m
# memory: 1024Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 75
targetMemoryUtilizationPercentage: 75
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: shenyu-bootstrap.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
#################################################
# datasource config of shenyu-admin #
#################################################
dataSource:
# options: [h2, mysql, pg, oracle]
active: h2
# init database and tables
initEnabled: true
h2:
# use custom datasource url, default is jdbc:h2:mem:~/shenyu;DB_CLOSE_DELAY=-1;MODE=MySQL;
url: ""
username: sa
password: sa
mysql:
# use custom datasource url and ignore other configs, the format is jdbc:mysql://xxxxxxx
urlOverride: ""
ip:
port: 3306
username: root
password:
database: shenyu
# mysql driver class name
# mysql5 : com.mysql.jdbc.Driver
# mysql6-8 : com.mysql.cj.jdbc.Driver
driverClass: com.mysql.cj.jdbc.Driver
connectorVersion: 8.0.23
pg:
# use custom datasource url and ignore other configs, the format is jdbc:postgresql://xxxxxxx
urlOverride: ""
ip:
port: 5432
username: postgres
password:
database: shenyu
# pg driver class name
driverClass: org.postgresql.Driver
connectorVersion: 42.5.0
oracle:
# use custom datasource url and ignore other configs, the format is jdbc:oracle:xxxxxx
urlOverride: ""
ip:
port: 1521
username: root
password:
serviceName: shenyu
# oracle driver class name
driverClass: oracle.jdbc.OracleDriver
connectorVersion: 19.3.0.0
#################################################
# application.yml of admin and bootstrap #
#################################################
applicationConfig:
bootstrap:
server:
# Do not change this port, it is used by the Kubernetes service
port: 9195
address: 0.0.0.0
spring:
main:
allow-bean-definition-overriding: true
application:
name: shenyu-bootstrap
codec:
max-in-memory-size: 2MB
cloud:
discovery:
enabled: false
nacos:
discovery:
# Spring Cloud Alibaba Dubbo use this.
server-addr: 127.0.0.1:8848
enabled: false
namespace: ShenyuRegisterCenter
# if you want use ribbon please config every server.
# springCloud-test:
# ribbon:
# NIWSServerListClassName: com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList
eureka:
client:
enabled: false
serviceUrl:
defaultZone: http://localhost:8761/eureka/
instance:
prefer-ip-address: true
# security:
# oauth2:
# client:
# registration:
# <your client-registration-id>:
# client-id: <your client-id>
# client-secret: <your client-secret>
# provider:
# <your client-registration-id>:
# authorization-uri: <your authorization-uri>
# token-uri: <your access-token-uri>
# user-info-uri: <your user-info-uri>
# jwk-set-uri: <your jwk-set-uri>
management:
health:
defaults:
enabled: false
shenyu:
trie:
childrenSize: 10000
pathVariableSize: 1000
pathRuleCacheSize: 1000
matchMode: antPathMatch
matchCache:
selectorEnabled: false
# 256MB
maxSelectorFreeMemory: 256
netty:
http:
# set to false, user can custom the netty tcp server config.
webServerFactoryEnabled: true
selectCount: 1
workerCount: 4
accessLog: false
serverSocketChannel:
soRcvBuf: 87380
soBackLog: 128
soReuseAddr: false
connectTimeoutMillis: 10000
writeBufferHighWaterMark: 65536
writeBufferLowWaterMark: 32768
writeSpinCount: 16
autoRead: false
allocType: "pooled"
messageSizeEstimator: 8
singleEventExecutorPerGroup: true
socketChannel:
soKeepAlive: false
soReuseAddr: false
soLinger: -1
tcpNoDelay: true
soRcvBuf: 87380
soSndBuf: 16384
ipTos: 0
allowHalfClosure: false
connectTimeoutMillis: 10000
writeBufferHighWaterMark: 65536
writeBufferLowWaterMark: 32768
writeSpinCount: 16
autoRead: false
allocType: "pooled"
messageSizeEstimator: 8
singleEventExecutorPerGroup: true
# httpclient:
# strategy: webClient
# connectTimeout: 45000
# responseTimeout: 3000
# readerIdleTime: 3000
# writerIdleTime: 3000
# allIdleTime: 3000
# readTimeout: 3000
# writeTimeout: 3000
# wiretap: false
# keepAlive: false
# maxInMemorySize: 1 #1mb
# pool:
# type: ELASTIC
# name: proxy
# maxConnections: 16
# acquireTimeout: 45000
# maxIdleTime: 3000
# proxy:
# host:
# port:
# username:
# password:
# nonProxyHostsPattern:
# ssl:
# useInsecureTrustManager: true
# keyStoreType: PKCS12
# keyStorePath: classpath:keystore.p12
# keyStorePassword: 123456
# keyStoreProvider:
# keyPassword: 123456
# trustedX509Certificates:
# handshakeTimeout:
# closeNotifyFlushTimeout:
# closeNotifyReadTimeout:
# defaultConfigurationType:
# threadPool:
# prefix: shenyu
# selectCount: 1
# workerCount: 8
# daemon: true
register:
enabled: false
# zookeeper, etcd, consul
registerType: zookeeper
# http://localhost:2379 #localhost:8848
serverLists: localhost:2181
props:
cross:
enabled: true
allowedHeaders:
allowedMethods: "*"
# the same of Access-Control-Allow-Origin: "*"
allowedAnyOrigin: true
# allowedOrigin:
# format : schema://prefix spacer domain
# Access-Control-Allow-Origin: "http://a.apache.org,http://b.apache.org"
# spacer: "."
# domain: apache.org
# prefixes:
# - a # a.apache.org
# - b # b.apache.org
# origins:
# - c.apache.org
# - d.apache.org
# - http://e.apache.org
# originRegex: ^http(|s)://(.*\.|)abc.com$
allowedExpose: ""
maxAge: "18000"
allowCredentials: true
switchConfig:
local: true
file:
enabled: true
maxSize: 10
sync:
websocket:
urls: ws://{{ template "common.names.fullname" . }}-admin.{{.Release.Namespace}}.svc.cluster.local:9095/websocket
allowOrigin: ws://{{ template "common.names.fullname" . }}-bootstrap.{{.Release.Namespace}}.svc.cluster.local:9195
# zookeeper:
# url: localhost:2181
# sessionTimeout: 5000
# connectionTimeout: 2000
# http:
# url: http://{{ template "common.names.fullname" . }}-admin.{{.Release.Namespace}}.svc.cluster.local:9095
# username:
# password:
# nacos:
# url: localhost:8848
# namespace: 1c10d748-af86-43b9-8265-75f487d20c6c
# username:
# password:
# acm:
# enabled: false
# endpoint: acm.aliyun.com
# namespace:
# accessKey:
# secretKey:
# etcd:
# url: http://localhost:2379
# consul:
# url: http://localhost:8500
# waitTime: 1000
# watchDelay: 1000
exclude:
enabled: false
paths:
- /favicon.ico
fallback:
enabled: false
paths:
- /fallback/hystrix
- /fallback/resilience4j
health:
enabled: true
paths:
- /actuator/health
- /actuator/health/readiness
- /actuator/health/liveness
- /health_check
extPlugin:
path:
enabled: true
threads: 1
scheduleTime: 300
scheduleDelay: 30
scheduler:
enabled: false
type: fixed
threads: 16
upstreamCheck:
enabled: false
timeout: 3000
healthyThreshold: 1
unhealthyThreshold: 1
interval: 5000
printEnabled: true
printInterval: 60000
ribbon:
serverListRefreshInterval: 10000
metrics:
enabled: false
name: prometheus
host: 127.0.0.1
port: 8090
jmxConfig:
props:
jvm_enabled: true
# plugins:
# rate-limiter.enabled: false
local:
enabled: false
sha512Key: "BA3253876AED6BC22D4A6FF53D8406C6AD864195ED144AB5C87621B6C233B548BAEAE6956DF346EC8C17F5EA10F35EE3CBC514797ED7DDD3145464E2A0BAB413"
# sharedPool:
# enable: true
# prefix: "shenyu-shared"
# corePoolSize: 200
# maximumPoolSize: 2000
# keepAliveTime: 60000
# # 1GB
# maxWorkQueueMemory: 1073741824
# # 256MB
# maxFreeMemory: 268435456
logging:
level:
root: info
org.springframework.boot: info
org.apache.ibatis: info
org.apache.shenyu.bonuspoint: info
org.apache.shenyu.lottery: info
org.apache.shenyu: info
admin:
server:
# Do not change this port, it is used by the Kubernetes service
port: 9095
address: 0.0.0.0
spring:
profiles:
active: "{{ .Values.dataSource.active }}"
thymeleaf:
cache: true
encoding: utf-8
enabled: true
prefix: classpath:/static/
suffix: .html
mvc:
pathmatch:
matching-strategy: ant_path_matcher
mybatis:
config-location: classpath:/mybatis/mybatis-config.xml
mapper-locations: classpath:/mappers/*.xml
shenyu:
register:
# http #zookeeper #etcd #nacos #consul
registerType: http
# localhost:2181 #http://localhost:2379 #localhost:8848
serverLists:
props:
sessionTimeout: 5000
connectionTimeout: 2000
checked: true
zombieCheckTimes: 5
scheduledTime: 10
nacosNameSpace: ShenyuRegisterCenter
sync:
websocket:
enabled: true
messageMaxSize: 10240
allowOrigins: ws://{{ template "common.names.fullname" . }}-admin.{{.Release.Namespace}}.svc.cluster.local:9095;ws://{{ template "common.names.fullname" . }}-bootstrap.{{.Release.Namespace}}.svc.cluster.local:9195;
# zookeeper:
# url: localhost:2181
# sessionTimeout: 5000
# connectionTimeout: 2000
# http:
# enabled: true
# nacos:
# url: localhost:8848
# namespace: 1c10d748-af86-43b9-8265-75f487d20c6c
# username:
# password:
# acm:
# enabled: false
# endpoint: acm.aliyun.com
# namespace:
# accessKey:
# secretKey:
# etcd:
# url: http://localhost:2379
# consul:
# url: http://localhost:8500
ldap:
enabled: false
url: ldap://xxxx:xxx
bind-dn: cn=xxx,dc=xxx,dc=xxx
password: xxxx
base-dn: ou=xxx,dc=xxx,dc=xxx
object-class: person
login-field: cn
jwt:
expired-seconds: 86400000
shiro:
white-list:
- /
- /favicon.*
- /static/**
- /index**
- /platform/login
- /websocket
- /error
- /actuator/health
- /swagger-ui.html
- /webjars/**
- /swagger-resources/**
- /v2/api-docs
- /csrf
swagger:
enable: true
dashboard:
core:
onlySuperAdminPermission:
- system:manager:add
- system:manager:edit
- system:manager:delete
- system:role:add
- system:role:edit
- system:role:delete
- system:resource:addButton
- system:resource:addMenu
- system:resource:editButton
- system:resource:editMenu
- system:resource:deleteButton
- system:resource:deleteMenu
logging:
level:
root: info
org.springframework.boot: info
org.apache.ibatis: info
org.apache.shenyu.bonuspoint: info
org.apache.shenyu.lottery: info
org.apache.shenyu: info