Skip to content

Commit f68d5f2

Browse files
add ob-operator parameter in doc (#903)
1 parent a1727c6 commit f68d5f2

4 files changed

Lines changed: 78 additions & 4 deletions

File tree

docsite/docs/manual/500.configuration-of-ob-operator.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,41 @@ This topic describes the startup parameters and environment variables of ob-oper
2525
| TELEMETRY_DEBUG | Specifies whether to enable DEBUG mode of telemetry. If you set the value to `true`, DEBUG mode is enabled. | Empty |
2626
| DISABLE_WEBHOOKS | Specifies whether to disable webhook verification. If you set the value to `true`, webhook verification is disabled. | Empty |
2727
| DISABLE_TELEMETRY | Specifies whether to disable the telemetry module. If you set the value to `true`, the telemetry module is disabled. The telemetry module collects and desensitizes the cluster environment and event information, and then it sends the information to OceanBase Database. OceanBase Database uses the information to improve ob-operator. | Empty |
28+
| OB_OPERATOR_DATABASE_CONNECTIONLRUCACHESIZE | The size of the database connection LRU cache. Default is 1000. | Empty |
29+
| OB_OPERATOR_RESOURCE_DEFAULTDISKEXPANDPERCENT | The default percentage to expand the disk. Default is 10. | Empty |
30+
| OB_OPERATOR_RESOURCE_DEFAULTLOGPERCENT | The default percentage of log disk usage. Default is 80. | Empty |
31+
| OB_OPERATOR_RESOURCE_INITIALDATADISKUSEPERCENT | The initial percentage of data disk usage. Default is 20. | Empty |
32+
| OB_OPERATOR_RESOURCE_DEFAULTDISKUSEPERCENT | The default percentage of disk usage. Default is 95. | Empty |
33+
| OB_OPERATOR_RESOURCE_DEFAULTMEMORYLIMITPERCENT | The default percentage of memory limit. Default is 90. | Empty |
34+
| OB_OPERATOR_RESOURCE_DEFAULTMEMORYLIMITSIZE | The default size of memory limit. Default is 0M. | Empty |
35+
| OB_OPERATOR_RESOURCE_DEFAULTDATAFILEMAXSIZE | The default maximum size of data file. Default is 0M. | Empty |
36+
| OB_OPERATOR_RESOURCE_DEFAULTDATAFILENEXTSIZE | The default next size of data file. Default is 1G. | Empty |
37+
| OB_OPERATOR_RESOURCE_MINMEMORYSIZE | The minimum memory size. Default is 8Gi. | Empty |
38+
| OB_OPERATOR_RESOURCE_MINDATADISKSIZE | The minimum data disk size. Default is 30Gi. | Empty |
39+
| OB_OPERATOR_RESOURCE_MINREDOLOGDISKSIZE | The minimum redo log disk size. Default is 30Gi. | Empty |
40+
| OB_OPERATOR_RESOURCE_MINLOGDISKSIZE | The minimum log disk size. Default is 10Gi. | Empty |
41+
| OB_OPERATOR_TIME_TENANTOPRETRYTIMES | The number of retries for tenant operations. Default is 9. | Empty |
42+
| OB_OPERATOR_TIME_TENANTOPRETRYGAPSECONDS | The gap in seconds between tenant operation retries. Default is 9. | Empty |
43+
| OB_OPERATOR_TIME_TASKMAXRETRYTIMES | The maximum number of retries for tasks. Default is 99. | Empty |
44+
| OB_OPERATOR_TIME_TASKRETRYBACKOFFTHRESHOLD | The threshold for task retry backoff. Default is 16. | Empty |
45+
| OB_OPERATOR_TIME_PROBECHECKPERIODSECONDS | The period in seconds for probe checks. Default is 2. | Empty |
46+
| OB_OPERATOR_TIME_PROBECHECKDELAYSECONDS | The delay in seconds for probe checks. Default is 5. | Empty |
47+
| OB_OPERATOR_TIME_GETCONNECTIONMAXRETRIES | The maximum retries for getting a connection. Default is 100. | Empty |
48+
| OB_OPERATOR_TIME_CHECKCONNECTIONINTERVAL | The interval in seconds for checking connections. Default is 3. | Empty |
49+
| OB_OPERATOR_TIME_CHECKJOBINTERVAL | The interval in seconds for checking jobs. Default is 3. | Empty |
50+
| OB_OPERATOR_TIME_CHECKJOBMAXRETRIES | The maximum retries for checking jobs. Default is 100. | Empty |
51+
| OB_OPERATOR_TIME_COMMONCHECKINTERVAL | The interval in seconds for common checks. Default is 5. | Empty |
52+
| OB_OPERATOR_TIME_BOOTSTRAPTIMEOUTSECONDS | The timeout in seconds for bootstrapping. Default is 2100. | Empty |
53+
| OB_OPERATOR_TIME_LOCALITYCHANGETIMEOUTSECONDS | The timeout in seconds for locality changes. Default is 86400. | Empty |
54+
| OB_OPERATOR_TIME_DEFAULTSTATEWAITTIMEOUT | The default timeout in seconds for resource state change waiting. Default is 1800. | Empty |
55+
| OB_OPERATOR_TIME_TIMECONSUMINGSTATEWAITTIMEOUT | The timeout in seconds for time-consuming task resource state change waiting. Default is 3600. | Empty |
56+
| OB_OPERATOR_TIME_WAITFORJOBTIMEOUTSECONDS | The timeout in seconds for waiting for a job. Default is 7200. | Empty |
57+
| OB_OPERATOR_TIME_SERVERDELETETIMEOUTSECONDS | The timeout in seconds for server deletion. Default is 604800. | Empty |
58+
| OB_OPERATOR_TIME_TOLERATESERVERPODNOTREADYMINUTES | The minutes to tolerate server pod not ready. Default is 5. | Empty |
59+
| OB_OPERATOR_TIME_DEFAULTSQLTIMEOUTSECONDS | The default timeout in seconds for SQL execution. Default is 60. | Empty |
60+
| OB_OPERATOR_TIME_TENANTSQLTIMEOUTSECONDS | The timeout in seconds for tenant SQL execution. Default is 600. | Empty |
61+
| OB_OPERATOR_TIME_TENANTRESTORETIMEOUTSECONDS | The timeout in seconds for tenant restore. Default is 600. | Empty |
62+
| OB_OPERATOR_TIME_POLLINGJOBSLEEPTIMESECONDS | The sleep time in seconds for polling jobs. Default is 1. | Empty |
2863

2964
## Modify the configuration
3065

docsite/i18n/zh-Hans/docusaurus-plugin-content-docs/current/manual/500.configuration-of-ob-operator.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,41 @@ sidebar_position: 5
2525
| TELEMETRY_DEBUG | 设置为 true 可开启遥测采集调试模式 ||
2626
| DISABLE_WEBHOOKS | 设置为 true 可禁用 webhooks 校验 ||
2727
| DISABLE_TELEMETRY | 设置为 true 可禁用遥测采集模块,遥测采集模块会采集集群环境和事件信息脱敏后发送给 OceanBase,期望通过这些数据帮助改善 ob-operator ||
28+
| OB_OPERATOR_DATABASE_CONNECTIONLRUCACHESIZE | 数据库连接 LRU 缓存大小。默认值为 1000。 ||
29+
| OB_OPERATOR_RESOURCE_DEFAULTDISKEXPANDPERCENT | 默认磁盘扩容百分比。默认值为 10。 ||
30+
| OB_OPERATOR_RESOURCE_DEFAULTLOGPERCENT | 默认日志磁盘使用百分比。默认值为 80。 ||
31+
| OB_OPERATOR_RESOURCE_INITIALDATADISKUSEPERCENT | 初始数据磁盘使用百分比。默认值为 20。 ||
32+
| OB_OPERATOR_RESOURCE_DEFAULTDISKUSEPERCENT | 默认磁盘使用百分比。默认值为 95。 ||
33+
| OB_OPERATOR_RESOURCE_DEFAULTMEMORYLIMITPERCENT | 默认内存限制百分比。默认值为 90。 ||
34+
| OB_OPERATOR_RESOURCE_DEFAULTMEMORYLIMITSIZE | 默认内存限制大小。默认值为 0M。 ||
35+
| OB_OPERATOR_RESOURCE_DEFAULTDATAFILEMAXSIZE | 默认数据文件最大大小。默认值为 0M。 ||
36+
| OB_OPERATOR_RESOURCE_DEFAULTDATAFILENEXTSIZE | 默认数据文件增长大小。默认值为 1G。 ||
37+
| OB_OPERATOR_RESOURCE_MINMEMORYSIZE | 最小内存大小。默认值为 8Gi。 ||
38+
| OB_OPERATOR_RESOURCE_MINDATADISKSIZE | 最小数据磁盘大小。默认值为 30Gi。 ||
39+
| OB_OPERATOR_RESOURCE_MINREDOLOGDISKSIZE | 最小 Redo 日志磁盘大小。默认值为 30Gi。 ||
40+
| OB_OPERATOR_RESOURCE_MINLOGDISKSIZE | 最小日志磁盘大小。默认值为 10Gi。 ||
41+
| OB_OPERATOR_TIME_TENANTOPRETRYTIMES | 租户操作重试次数。默认值为 9。 ||
42+
| OB_OPERATOR_TIME_TENANTOPRETRYGAPSECONDS | 租户操作重试间隔(秒)。默认值为 9。 ||
43+
| OB_OPERATOR_TIME_TASKMAXRETRYTIMES | 任务最大重试次数。默认值为 99。 ||
44+
| OB_OPERATOR_TIME_TASKRETRYBACKOFFTHRESHOLD | 任务重试退避阈值。默认值为 16。 ||
45+
| OB_OPERATOR_TIME_PROBECHECKPERIODSECONDS | 探针检查周期(秒)。默认值为 2。 ||
46+
| OB_OPERATOR_TIME_PROBECHECKDELAYSECONDS | 探针检查延迟(秒)。默认值为 5。 ||
47+
| OB_OPERATOR_TIME_GETCONNECTIONMAXRETRIES | 获取连接最大重试次数。默认值为 100。 ||
48+
| OB_OPERATOR_TIME_CHECKCONNECTIONINTERVAL | 检查连接间隔(秒)。默认值为 3。 ||
49+
| OB_OPERATOR_TIME_CHECKJOBINTERVAL | 检查 Job 间隔(秒)。默认值为 3。 ||
50+
| OB_OPERATOR_TIME_CHECKJOBMAXRETRIES | 检查 Job 最大重试次数。默认值为 100。 ||
51+
| OB_OPERATOR_TIME_COMMONCHECKINTERVAL | 通用检查间隔(秒)。默认值为 5。 ||
52+
| OB_OPERATOR_TIME_BOOTSTRAPTIMEOUTSECONDS | 引导超时时间(秒)。默认值为 2100。 ||
53+
| OB_OPERATOR_TIME_LOCALITYCHANGETIMEOUTSECONDS | Locality 变更超时时间(秒)。默认值为 86400。 ||
54+
| OB_OPERATOR_TIME_DEFAULTSTATEWAITTIMEOUT | 默认资源状态变化等待超时时间(秒)。默认值为 1800。 ||
55+
| OB_OPERATOR_TIME_TIMECONSUMINGSTATEWAITTIMEOUT | 耗时任务资源状态变化等待超时时间(秒)。默认值为 3600。 ||
56+
| OB_OPERATOR_TIME_WAITFORJOBTIMEOUTSECONDS | 等待 Job 超时时间(秒)。默认值为 7200。 ||
57+
| OB_OPERATOR_TIME_SERVERDELETETIMEOUTSECONDS | Server 删除超时时间(秒)。默认值为 604800。 ||
58+
| OB_OPERATOR_TIME_TOLERATESERVERPODNOTREADYMINUTES | 容忍 Server Pod 未就绪时间(分钟)。默认值为 5。 ||
59+
| OB_OPERATOR_TIME_DEFAULTSQLTIMEOUTSECONDS | 默认 SQL 超时时间(秒)。默认值为 60。 ||
60+
| OB_OPERATOR_TIME_TENANTSQLTIMEOUTSECONDS | 租户 SQL 超时时间(秒)。默认值为 600。 ||
61+
| OB_OPERATOR_TIME_TENANTRESTORETIMEOUTSECONDS | 租户恢复超时时间(秒)。默认值为 600。 ||
62+
| OB_OPERATOR_TIME_POLLINGJOBSLEEPTIMESECONDS | 轮询 Job 睡眠时间(秒)。默认值为 1。 ||
2863

2964
## 修改方法
3065

internal/config/operator/default.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ var defaultConfigMap = map[string]any{
7878
"time.serverDeleteTimeoutSeconds": oc.ServerDeleteTimeoutSeconds,
7979
"time.tolerateServerPodNotReadyMinutes": oc.TolerateServerPodNotReadyMinutes,
8080

81-
"time.defaultSqlTimeoutSeconds": 60,
82-
"time.tenantSqlTimeoutSeconds": 600,
83-
"time.tenantRestoreTimeoutSeconds": 600,
84-
"time.pollingJobSleepTimeSeconds": 1,
81+
"time.defaultSqlTimeoutSeconds": oc.DefaultSqlTimeoutSeconds,
82+
"time.tenantSqlTimeoutSeconds": oc.TenantSqlTimeoutSeconds,
83+
"time.tenantRestoreTimeoutSeconds": oc.TenantRestoreTimeoutSeconds,
84+
"time.pollingJobSleepTimeSeconds": oc.PollingJobSleepTimeSeconds,
8585
}
8686

8787
func setDefaultConfigs(vp *viper.Viper) {

internal/const/oceanbase/time.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ const (
3939
TimeConsumingStateWaitTimeout = 3600
4040
WaitForJobTimeoutSeconds = 7200
4141
ServerDeleteTimeoutSeconds = 604800 // 7 days
42+
DefaultSqlTimeoutSeconds = 60
43+
TenantSqlTimeoutSeconds = 600
44+
TenantRestoreTimeoutSeconds = 600
45+
PollingJobSleepTimeSeconds = 1
4246
)
4347

4448
const (

0 commit comments

Comments
 (0)