Configurations
Application service configuration items consist of environement variables and distribution dynamic configuration.
Each configuration item is assigned to the variable Values of the backend service.
In addition, when dynamic configuration is published, each node with the same namespace will automatically sync up the variable Values.
Environement
MODE
Working mode, default
debug
HOSTNAME
Host, the default is the hostname of the pod
ADDRESS
Listening address, default
:3000
XAPI recommends setting
:6000
,OpenAPI recommends setting:9000
CONSOLE *required
Public address of the front end
For example: https://console.developer.com
IP
Customize the header to get the IP, default
X-Forwarded-For
For example: after CDN, WAF, etc. back to the source Kubernetes the original "X-Forwarded-For" will lose the real IP coverage
XDOMAIN
Customized XSRF Cookie Domain Names
For example: solve the problem that XSRF Token cannot be obtained due to the separation of the front and back ends
NAMESPACE *required
Namespace, it's unique within the same Nats tenant, DevOps defaults to
weplanx
tenant
KEY *required
App key for signing, data encryption, etc
DATABASE_URL *required
MongoDB connection address
DATABASE_NAME *required
MongoDB database name
DATABASE_REDIS *required
Redis connection address
NATS_HOSTS *required
Nats connection host, use
,
split
NKEY_NKEY *required
Nats NKEY authentication
INFLUX_URL *required
InfluxDB connection address
INFLUX_ORG *required
Organization naming for InfluxDB
INFLUX_TOKEN *required
Authorized Token for InfluxDB
INFLUX_BUCKET *required
InfluxDB bucket
OTLP_ENDPOINT *required
OpenTelemetry ENDPOINT
OTLP_TOKEN *required
OpenTelemetry TOKEN
Dynamic
Dynamic configuration is based on the Nats KeyValue implementation, which is the core of supporting distribution application configuration sync up.
Data stores are encrypted, but allow deciphers to return after authentication.
*secret This part of the field will not be returned in its entirety, and it means it is not empty when returning
*
.
Define the configuration file default.values.yml, and use Snake Case for the configuration name.
SessionTTL
time.Duration
Session period, default1h
For example: how many seconds of session contract renewal in the operation
LoginTTL
time.Duration
Login failed lock duration, default15m
LoginFailures
int64
Maximum number of consecutive login failures, default5
IpLoginFailures
int64
The maximum number of consecutive login failures with IP, default10
IpWhitelist
[]string
IP Whitelist
IpBlacklist
[]string
IP Blacklist
PwdStrategy
int
Password strength policy0
Unlimited1
Uppercase and lowercase letters2
Uppercase and lowercase letters, numbers3
Uppercase and lowercase letters, numbers, special characters
PwdTTL
time.Duration
Password valid period,0
permanent
Cloud
string
Public cloud platformtencent
Tencent Cloudaliyun
Alibaba Cloudaws
Amazon Cloud
TencentSecretId
string
Secret ID of Tencent CloudIt is recommended to create a CAM subuser for this app and authorize the minimum permissions required
TencentSecretKey *secret
string
Secret Key of Tencent Cloud
TencentCosBucket
string
Bucket of Tencent Cloud COS
TencentCosRegion
string
COS Region
TencentCosExpired
int64
Presignature valid period in seconds
TencentCosLimit
int64
Upload size limit
Collaboration
string
Office collaboration platformlark
Lark or Feishu
LarkAppId
string
App ID of Lark & Feishu
LarkAppSecret *secret
string
App Secret of Lark & Feishu
LarkEncryptKey *secret
string
Encrypt Key of Lark & Feishu
LarkVerificationToken *secret
string
Verification Token of Lark & Feishu
RedirectUrl
string
Third-party redirect address
EmailHost
string
Public Email SMTP Address
EmailPort
int
Public Email SMTP port number (SSL), default465
EmailUsername
string
Public Email User
EmailPassword *secret
string
Public Email Password
ApiGatewayUrl
string
API Gateway Address
ApiGatewayKey
string
Key of API Gateway ApplicationExample: Tencent Cloud API Gateway Authentication
ApiGatewaySecret *secret
string
Secret of API Gateway Application
RestControls
map[string]*RestControl
Dynamic configuration of Mongo RestRestControl
Keys
[]string
ProjectionSensitives
[]string
DesensitizationStatus
bool
Allow accessEvent
bool
Event callbacks
RestTxnTimeout
time.Duration
Transaction suspend valid period, default3m
Extended Dynamic
Weplanx/server also extends other configurations, which are not required if other applications are customized:
IpAddress
string
Address to get IPv4 detailsCurrently using Tencent Cloud Market 数链云
The log set is marked as
metadata.version: shuliancloud.v4
IpSecretId
string
Get Secret ID of IPv4 details
IpSecretKey *secret
string
Get Secret Key for IPv4 Details
Ipv6Address
string
Address to get IPv6 detailsCurrently using Tencent Cloud Market 数链云
The log set is marked as
metadata.version: shuliancloud.v4
Ipv6SecretId
string
Get Secret ID of IPv6 details
Ipv6SecretKey *secret
string
Get Secret Key for IPv6 Details
SmsSecretId
string
Secret ID of Tencent Cloud SMS
SmsSecretKey *secret
string
Secret of Tencent Cloud SMS
SmsSign
string
Sign of Tencent Cloud SMS
SmsAppId
string
App ID of Tencent Cloud SMS
SmsRegion
string
Region of Tencent Cloud SMS
SmsPhoneBind
string
Template ID for mobile binding of Tencent Cloud SMS
SmsLoginVerify
string
Template ID for login of Tencent Cloud SMS
EmqxHost
string
EMQX API Host
EmqxApiKey
string
Key of EMQX API
EmqxSecretKey *secret
string
Secret Key of EMQX API
AccelerateAddress
string
Address of accelerate function of Tencent Cloud SCFInternational network not required
CamUin
string
Tencent cloud main account ID
Last updated