Configuration parameters
Categories:
This document provides a comprehensive overview of the configuration parameters within the Cluster Optimizer platform’s configuration file.
Overview
The cloud-native cluster optimization platform must rely on configuration files to run. The configuration file location can be specified through the command line parameter --config
, for example: --config=conf/cluster-optimizer.yaml
. The default path is conf/cluster-optimizer.yaml
The cloud-native cluster optimization platform requires configuration files to define its operational parameters. The location of the configuration file can be specified using the --config
command-line argument, e.g., --config=conf/cluster-optimizer.yaml
. By default, the configuration file is located at conf/cluster-optimizer.yaml
.
The configuration file is written in YAML format, as illustrated below:
server:
port: 7070
engine:
maxQueryDuration: 4h
optconf:
dataSource:
name: "root:optimizer@tcp(127.0.0.1:3306)/optconf?createDatabaseIfNotExist=true&charset=utf8mb4&readTimeout=30s&writeTimeout=30s&parseTime=true&loc=Local"
maxOpenConns: 10
optdata:
dataSource:
name: "root:optimizer@tcp(127.0.0.1:3306)/optdata?createDatabaseIfNotExist=true&charset=utf8mb4&readTimeout=30s&writeTimeout=30s&parseTime=true&loc=Local"
maxOpenConns: 10
optimize:
defaultCron: "0 0 1 * * ?"
strategyConfigs:
"OOM":
enabled: false
"Resource Recommendation":
enabled: false
"Low Utilization Node":
enabled: false
"No Quota":
enabled: false
enabled: true
sms:
enabled: false
...
notification:
templateBasePath: templates/notification
Configuration Parameters
server.port
The server.port
parameter defines the external service port for the Cluster Optimizer platform. The default value is 7070
.
engine.maxQueryDuration
The parameter engine.maxQueryDuration
sets the maximum query period of the query measurement server (such as Prometheus). The default value is 1d
(24 hours). When the query time range exceeds the maximum query period, it will be divided into multiple query windows for separate queries, thereby reducing the pressure on the server.
optconf
The optconf parameter configures the optimization configuration database. It includes the following sub-parameters:
dataSource.name
The dataSource.name
parameter specifies the MySQL data source connection string. For example: root:optimizer@tcp(127.0.0.1:3306)/optconf?createDatabaseIfNotExist=true&charset=utf8mb4&readTimeout=30s&writeTimeout=30s&parseTime=true&loc=Local
. The createDatabaseIfNotExist
option ensures that the database is created if it does not already exist.
maxOpenConns
The maxOpenConns
parameter defines the maximum number of open connections to the database.
optdata
The optdata
parameter configures the optimization data database. Its sub-parameters are identical to those in the optconf
section, and their meanings remain consistent.
optimize
The optimize parameter governs the settings related to the optimization engine. It includes several sub-parameters:
defaultCron
The defaultCron
parameter defines the default scheduling cron expression for the optimization engine. The default value is “0 0 1 * * ?
” (which schedules execution at 1:00 AM daily).
enabled
The enabled
parameter enables or disables the optimization engine. The default value is true.
strategyConfigs
The strategyConfigs
parameter is a key-value pair that configures specific optimization strategies. Each key represents a strategy name, and its value contains the strategy’s configuration.
The structure of a strategy configuration is as follows:
enabled: false
cron: "0 0 1 * * ?"
parameters:
- key1: value1
- key2: value2
enabled
: Determines whether the strategy is active. The default value is true.cron
: Specifies the cron expression for scheduling the strategy.parameters
: Contains strategy-specific settings, detailed below.
- Strategy
Node Group Recommendation
Parameter name | Default value | Description |
---|---|---|
cpuMaxUsage |
0.7 | Maximum CPU utilization for the node group, range: (0,1] |
memoryMaxUsage |
0.8 | Maximum memory utilization for the node group, range: (0,1] |
cpuMinCores |
2 | Minimum CPU cores for recommended instance types, must be ≥ 1 |
memoryMinGBs |
4 | Minimum memory for recommended instance types, in GB, must be ≥ 1 |
recommendTopK |
5 | Maximum number of recommended instance types, range: [1,10] |
- Strategy
Node Recommendation
Parameter name | Default value | Description |
---|---|---|
duration |
8d | Time range for the analysis. |
step |
24h | Step size for the time range. |
resolution |
2m | Query resolution. |
cpuStep |
1 | Minimum CPU step size, in cores. |
memoryStep |
1 | Minimum memory step size, unit GB |
cpuMaxUsage |
0.6 | Maximum CPU utilization for the node |
memoryMaxUsage |
0.8 | Maximum memory utilization for the node |
- Strategy
Underutilized Node
Parameter name | Default value | Description |
---|---|---|
duration |
8d | Time range for the analysis. |
step |
24h | Step size for the time range |
resolution |
2m | Query resolution |
cpuAvgThreshold |
0.2 | Average CPU utilization threshold |
cpuMaxThreshold |
0.6 | Maximum CPU utilization threshold |
memoryAvgThreshold |
0.3 | Average memory utilization threshold |
memoryMaxThreshold |
0.6 | Maximum memory utilization threshold |
- Strategy
Underutilized GPU Node
.
Parameter name | Default value | Description |
---|---|---|
duration |
8d | Time range for analysis |
step |
24h | Step size for the time range |
resolution |
2m | Query resolution |
gpuAvgThreshold |
0.2 | Average GPU utilization threshold |
gpuMaxThreshold |
0.8 | Maximum GPU utilization threshold |
- Strategy
Underutilized Disk
Parameter name | Default value | Description |
---|---|---|
duration |
8d | Time range for analysis |
step |
24h | Step size for the time range |
resolution |
2m | Query resolution |
threshold |
0.3 | Disk utilization threshold for low usage. |
- Strategy
Unused PV
Parameter name | Default value | Description |
---|---|---|
boundDuration |
1h | Time duration before a persistent storage volume is considered unused if unbound. |
- Strategy
Underutilized PV
Parameter name | Default value | Description |
---|---|---|
duration |
8d | Time range for analysis |
step |
24h | Step size for the time range |
resolution |
2m | Query resolution |
threshold |
0.3 | Persistent volume utilization threshold for low usage. |
- Strategy
Resource Recommendation
Parameter name | Default value | Description |
---|---|---|
duration |
8d | Time range for analysis |
step |
24h | Step size for the time range |
resolution |
2m | Query resolution |
cpuStep |
0.05 | Minimum CPU step size, in cores |
memoryStep |
0.1 | Minimum memory step size, in GiB |
cpuMaxUsage |
0.6 | Maximum CPU utilization for recommendation |
memoryMaxUsage |
0.8 | Maximum memory utilization for recommendation |
- Strategy
Resource Quota Unset
Parameter name | Default value | Description |
---|---|---|
duration |
8d | Time range for analysis |
step |
24h | Step size for the time range |
resolution |
2m | Query resolution |
cpuStep |
0.05 | Minimum CPU step size, in cores |
memoryStep |
0.1 | Minimum memory step size, in GiB |
cpuMaxUsage |
0.6 | Maximum CPU utilization for recommendation |
memoryMaxUsage |
0.8 | Maximum memory utilization for recommendation |
- Strategy
OOM
(Out of Memory)
Parameter name | Default value | Description |
---|---|---|
duration |
8d | Specifies the time range in days to monitor for memory overflow (OOM) events. The default value is 8 days. |
interval |
1 hour | Defines the cleanup cycle for expired OOM events. |
SMS Configuration sms
The SMS configuration is mainly for the system to send verification codes/security codes. Its configuration parameters are as follows:
Parameter name | Default value | Description |
---|---|---|
enabled |
true |
Determines whether SMS functionality is enabled. |
provider |
Specifies the SMS service provider. Supported providers include AWS, Azure, Alibaba Cloud, Tencent Cloud, Baidu Cloud, etc. | |
accessKeyId |
Corresponds to the AccessKeyId of the SMS service provider. Field names may vary depending on the provider. |
|
accessKeySecret |
Corresponds to the AccessKeySecret of the SMS service provider. Field names may vary depending on the provider. |
|
signName |
The signature used by the SMS service provider. | |
template |
The template ID used by the SMS service provider for sending messages. | |
extras |
[] |
An ordered list of additional parameters required by the SMS service provider. |
Example Configuration for Tencent Cloud:
sms:
enabled: true
provider: "Tencent Cloud SMS"
accessKeyID: AK******
accessKeySecret: NY******
signName: Yunzhiyouben
template: 210000
extras:
- 1000000000
In this example:
accessKeyID
andaccessKeySecret
: These are the credentials for Tencent Cloud SMS, corresponding to theSecretId
andSecretKey
fields, respectively. These credentials can be obtained from the Cloud API Key.signName
: This parameter is the SMS signature used by Tencent Cloud SMS. It corresponds to theSignName
field as outlined in the Send SMS Interface..template
: This refers to the ID of the SMS template used for message formatting. It corresponds to the TemplateId field, as detailed in the Send SMS Interface..extras
: This is a list of additional parameters required by the SMS service provider. For Tencent Cloud SMS, this includes theSmsSdkAppId
, which corresponds directly to theSmsSdkAppId
field as specified in the Send SMS Interface.
notification
The notification
parameter is utilized for configuring the notification settings of the optimization platform.
notification.templateBasePath
The notification.templateBasePath
parameter specifies the directory path where notification templates are stored. The default path is templates/notification
.
Currently, the default notification template name is default
.
Email Configuration email
The Email configuration is mainly for the system to send emails. Its configuration parameters are as follows:
Parameter Name | Default Value | Description |
---|---|---|
enabled |
true |
Determines whether email functionality is enabled. |
provider |
Specifies the email service provider. Supported providers include AWS, Azure, Alibaba Cloud, Tencent Cloud, etc. | |
clientId |
Corresponds to the ClientId of the email service provider. Field names may vary depending on the provider. |
|
clientSecret |
Corresponds to the ClientSecret of the email service provider. Field names may vary depending on the provider. |
|
host |
Specifies the hostname or IP address of the email service provider’s SMTP server. It is crucial for directing email traffic to the correct server for processing outgoing emails. | |
port |
Defines the network port used to connect to the email service provider’s SMTP server. Common port values are 587 for TLS/STARTTLS, 465 for SSL, and 25 for non-encrypted communication. The choice of port must align with the security requirements of the email service. | |
disableSSL |
Determines whether SSL encryption is disabled for the connection to the SMTP server. If set to true, SSL is turned off, which may be necessary for certain server configurations or in environments where encryption is managed differently. However, disabling SSL can expose communication to potential security risks. | |
endpoint |
Defines the URL or specific network endpoint used for connecting to the email service provider’s API. This is particularly relevant for cloud-based or API-driven email services, where emails are sent via HTTP requests rather than traditional SMTP. | |
method |
Indicates the HTTP method (such as POST, GET, PUT, etc.) used when interacting with the email service provider’s API. Typically, POST is used for sending emails because it allows for the transmission of email content and metadata in the request body. | |
region |
Specifies the geographical region in which the email service provider’s servers are located. This is important for optimizing latency, compliance with data residency requirements, and possibly cost management, depending on the email service provider. | |
template |
The template used by the email service provider for sending messages. Default value is templates/email_code.tpl . |
|
fromAddress |
Sets the email address that appears in the “From” field of the email. It is the address that recipients will see as the sender. This address should be a verified or authorized address within the email service provider’s system. | |
fromName |
Specifies the display name associated with the fromAddress . This name appears in the recipient’s inbox as the sender’s name, enhancing the email’s branding and recognition. |
License configuration license
The license configuration is mainly for configing license for commercial version. Its configuration parameters are as follows:
Parameter Name | Default Value | Description |
---|---|---|
accessKeyId | The accessKeyId is a unique identifier assigned to your account or application. It is utilized to authenticate requests when retrieving a license online. This key is integral to the authentication process and works in conjunction with the accessKeySecret to facilitate secure access to licensing services. |
|
accessKeySecret | The accessKeySecret is the secret key paired with the accessKeyId . It is used to sign and authenticate API requests, ensuring secure communication with the licensing services. This key must remain confidential, as it grants access to critical operations related to license retrieval and validation. |
|
managerBaseUrl | The managerBaseUrl specifies the base URL for the licensing manager service. This URL is used as the endpoint for all API requests related to license retrieval. |
|
certificate | Refers to the license certificate provided offline. This certificate is used to validate the authenticity and integrity of the license. | |
signature | Contains the cryptographic signature of the license, provided offline. This signature is used to verify the integrity and authenticity of the license certificate, ensuring that it has not been tampered with. |